Home > Software design >  Is there a way to make a web map with custom areas that display custom info at addresses?
Is there a way to make a web map with custom areas that display custom info at addresses?

Time:01-09

I am trying to make a map for work with our prices for different areas. Basically I would like to be able to add areas to a map so that if I search an address depending what area it is in will tell me the various prices. Is this possible?

I have tried using google map API tutorials but can only add a coloured area that doesn't really do much

CodePudding user response:

This is very possible. Store your areas as an array containing sets of coordinate pairs. Each area with its pricing. You can use Google My Maps to draw the boundaries using real-world GPS coordinates. You can export the polygon shapes you create to JSON data.

Use Google Maps API to lookup a street address and retrieve the GPS coordinates.

Use Point In Polygon class to check which polygon the GPS coordinate belongs in (if any) and assess the price.

  • Related