0

POI dict and polyline support

Added support for filter functions to return dicts.
Added support for filter functions to return a list of coordinates to
draw lines between when shown.
This commit is contained in:
Freakus Geekus
2013-02-16 21:05:36 +00:00
parent b8e2003c65
commit b75eb7e5b5
2 changed files with 64 additions and 0 deletions

View File

@@ -474,6 +474,22 @@ overviewer.views.SignControlView = Backbone.View.extend({
}
}
dataRoot[i].markerObjs.push(marker);
// Polyline stuff added by FreakusGeekus. Probably needs work.
if (typeof entity['polyline'] != 'undefined') {
var polypath = new Array();
for (point in entity.polyline) {
polypath.push(overviewer.util.fromWorldToLatLng(entity.polyline[point].x, entity.polyline[point].y, entity.polyline[point].z, overviewer.mapView.options.currentTileSet));
}
var polyline = new google.maps.Polyline({
'path': polypath,
'clickable': false,
'map': overviewer.map,
'visible': false,
'strokeColor': entity['strokeColor']
});
dataRoot[i].markerObjs.push(polyline);
}
}
dataRoot[i].created = true;
}