KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Inserting a polygon inside another polygon is supposed to make a "hole" in the center (see the Google maps Pentagon example). However, my program keeps failing to make a hole and instead makes two layers of polygon lines insead. http://cl.ly/1c243E1V1G2M1D3H3c0O <-- image of my map Someone said changing the coordinate order fixed their problem so I selected exactly the coordinates of the bermuda triangle as given by Google in their example, however, it had the same problem I encountered before. The relevant code is below: var everythingElse = [ new google.maps.LatLng(25.774252, -82.190262), new google.maps.LatLng(17.466465, -65.118292), new google.maps.LatLng(34.321384, -63.75737), new google.maps.LatLng(25.774252, -82.190262) ]; var circleOverlay = [ new google.maps.LatLng(25.774252, -80.190262), new google.maps.LatLng(18.466465, -66.118292), new google.maps.LatLng(32.321384, -64.75737), new google.maps.LatLng(25.774252, -80.190262) ]; PropertySearch.tintPolygon = new google.maps.Polygon({ paths: [ everythingElse, circleOverlay ], strokeColor: "#000000", strokeOpacity: 0.8, strokeWeight: 2, fillColor: "#000000", fillOpacity: 0.5 }); PropertySearch.tintPolygon.setMap(PropertySearch.map);
Tags (comma-separated)
Save Edits
Cancel