Commit 5ae63a0d authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

autocolors for markers

parent 1008c131
......@@ -67,6 +67,16 @@ var SETTINGS = {
// 'kml' : "scene.kml"
}
var AUTOCOLORS = [
"#f22",//red
"#f80",//orange
"#fe2",//yellow
"#0e0",//green
"#1ff",//lblue
"#49f",//blue
"#a4f" //purple
];
var MARKER_PREFIX = "my-sph-";
// no comments
......@@ -588,10 +598,13 @@ function leaf_events(){
if (Lm!=undefined){
var color = SETTINGS.markercolor;
color = AUTOCOLORS[Data.markers.length%AUTOCOLORS.length];
var mark = new X3L({
latitude: Lm._latlng.lat,
longitude: Lm._latlng.lng,
color: SETTINGS.markercolor,
color: color,
size: SETTINGS.markersize,
});
......
......@@ -1350,11 +1350,15 @@ X3DOMObject.createNewMarker = function(x,y,z){
var Camera = Map.marker;
// Create marker for Data
var color = SETTINGS.markercolor;
color = AUTOCOLORS[Data.markers.length%AUTOCOLORS.length];
var mark = new X3L({
x: parseFloat(x) || 0,
y: parseFloat(y) || 0,
z: parseFloat(z) || 0,
color: SETTINGS.markercolor,
color: color,
size: SETTINGS.markersize,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment