0

Here is what I would like to achieve : I have a Google My Maps map, with a few polygons over a city, representing districts. On the server side of my application, I would like to create a tool that, when given a position, can return me the polygon it is into.

Is it even possible ? Maybe My Maps is not the good service, if so, I am totally open to work with something else.

geocodezip
  • 158,664
  • 13
  • 220
  • 245
Thib L
  • 704
  • 1
  • 8
  • 20
  • 1
    Yes. It is possible. Can you provide an example of your MyMap that you want to use? – geocodezip Apr 04 '16 at 19:07
  • Thank you for your answer, here is a link of a map. https://www.google.com/maps/d/edit?mid=zH--VW1h2BLo.kLZyyDb7raFY&usp=sharing – Thib L Apr 04 '16 at 19:20
  • related question: [use Google My Maps with geoxml3](http://stackoverflow.com/questions/29865772/use-google-my-maps-with-geoxml3) – geocodezip Apr 05 '16 at 13:30
  • related question: [How to Check if a Point is in KML Polygon (GIS Shapefile)](http://stackoverflow.com/questions/15264735/how-to-check-if-a-point-is-in-kml-polygon-gis-shapefile) – geocodezip Apr 05 '16 at 13:31
  • @geocodezip Thanks, I am reading that now and the thing is I need absolutely no rendering for the tool I need to create. No HTML and no human interaction at all. So I am a little lost, can I do this with JS ? – Thib L Apr 05 '16 at 14:34

1 Answers1

1

One option is to use the geoxml3 kmz branch with a binary proxy to access the .kmz data from Google MyMaps, that will render your data as native Google Maps Javascript API objects. Then you can use point in polygon tests to determine which polygon your input point is in.

(Note: I couldn't make your data work, there were character encoding issues that made the KML invalid).

geocodezip
  • 158,664
  • 13
  • 220
  • 245