Google Maps polygon drawing/mapping

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!
2 answers

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

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, then where do I put the piece of code that draws the Polygon line on the map:


Hope anyone can help?