Open antoinebartholomew opened 6 years ago
-- good one with working JS Fiddle
https://stackoverflow.com/questions/42472373/google-maps-infowindows-for-multiple-polygons
Info Bubble - https://github.com/googlemaps/js-info-bubble
Info Box - https://github.com/googlemaps/v3-utility-library/tree/master/infobox
An InfoBox can also be used as a map label. An InfoBox also fires the same events as a google.maps.InfoWindow.
http://michaelsoriano.com/customize-google-map-info-windows-infobox/
google.maps.event.addListener(drawingManager,'polygoncomplete',function(polygon){ openInfoWindowPolygon(polygon); }); } function openInfoWindowPolygon(polygon) { var vertices = polygon.getPath(); var contents = 'Hello World'; var bounds = new google.maps.LatLngBounds(); vertices.forEach(function(xy,i){ bounds.extend(xy); }); infoWindow.setContent(contents); infoWindow.setPosition(bounds.getCenter()); drawingManager.setDrawingMode(null); infoWindow.open(map); }
On polygon complete, show infowindow for data attriution...
User draws a polygon, the user should be able to add meta data about that polygon through an associated web form or via an Info window/info box. The polygon coords arrary will save to DB
On-polygon-Complete, show info window - http://jsbin.com/niwonatu/1/edit?html,js,output
https://stackoverflow.com/questions/23098274/add-infobox-to-polygon-drawn-using-drawing-manager-in-google-maps
Info Window with Save Button(markers) -- https://stackoverflow.com/questions/36238766/save-button-not-attached-to-the-right-infowindow-google-map
polygon type (activity)- dog park, tennis court, baseball, etc comments - rating - polygon name - park name or something polygon ID Coordinates Array