Fixed rendering regions. genPOI.py: add new line to baseMakers.js; views.js: add polygons, with all the features that Google provides, polylines work fine; regions.js: example of usage
This commit is contained in:
@@ -496,6 +496,26 @@ overviewer.views.SignControlView = Backbone.View.extend({
|
||||
'strokeColor': entity['strokeColor']
|
||||
});
|
||||
dataRoot[i].markerObjs.push(polyline);
|
||||
}
|
||||
|
||||
// Polygons
|
||||
if (typeof entity['polygon'] != 'undefined') {
|
||||
var polypath = new Array();
|
||||
for (point in entity.polygon) {
|
||||
polypath.push(overviewer.util.fromWorldToLatLng(entity.polygon[point].x, entity.polygon[point].y, entity.polygon[point].z, overviewer.mapView.options.currentTileSet));
|
||||
}
|
||||
|
||||
var polygon = new google.maps.Polygon({
|
||||
'clickable': false,
|
||||
'fillColor': entity['fillColor'],
|
||||
'fillOpacity': entity['fillOpacity'],
|
||||
'map': overviewer.map,
|
||||
'path': polypath,
|
||||
'strokeColor': entity['strokeColor'],
|
||||
'strokeOpacity': entity['strokeOpacity'],
|
||||
'visible': false
|
||||
});
|
||||
dataRoot[i].markerObjs.push(polygon);
|
||||
}
|
||||
}
|
||||
dataRoot[i].created = true;
|
||||
|
||||
Reference in New Issue
Block a user