Google Maps polygon drawing/mapping

2
Does anybody have experience with or a working module in which polygons in Google Maps are drawn? Since Mendix doesn't have a GeoField-datatype, I would say that the polygons, which consist of an array of (longitude,latitude), are to be stored as a string and then plotted in Google Maps via an API-call. Hope anybody can help!
asked
2 answers
1

To achieve this you can modify the Google Maps widget.

Change the interface (.xml file)

  • Add polygon entity
  • Add long/lat attribute
  • Add xpath constraint

In the widget

  • Read the data
  • Add the lines to the map. See google map samples
answered
0

Hi Chris,

Thanks for the answer. For the last thing you are mentioning; adding the lines to the map by altering googlemapsoverview.js, I am not quite sure where to alter the JS-file. Let's say I want a non-dynamical polygon drawn, see https://developers.google.com/maps/documentation/javascript/examples/polygon-simple?hl=nl, then where do I put the piece of code that draws the Polygon line on the map:

bermudaTriangle.setMap(map);

Hope anyone can help?

answered