How does Maps automatically draw the polygon when entering the neighborhood name?

2

How does Google Maps draw the polygon automatically when we type the name of a neighborhood?

Below I did a search on the maps for the neighborhood

asked by anonymous 04.05.2018 / 22:36

1 answer

1

To create a polygon we need to know the area to be delimited we need coordinates; if we have the coordinates that will define the contour of the polygon, the work becomes easier; in our case since we do not have the coordinates, we create the perimeter of the area to be delimited and then we will get the coordinates. To learn how to create a file for displaying maps with the V3 Google Maps API, visit the article Creating a polygon map with the Maps API V3.

Withthelinedrawingtoolselectedsimplydrawthedesiredpolygon.Onetip,asoftentheareaofthepolygonisextensiveandweneedtomovemelomapandzoom,themouseclickcannotbeusedtomovethemap,becauseeachclickwiththemousecorrespondstoapointofthepolygontobemarked;sousethemouseonlytomarkthepointsofthepolygon,andscrooltosetthezoom,movingbythemapmustbedoneonlybythearrowkeys.

Thislinkshowstheprocedurecompletely: link

    
04.05.2018 / 22:44