angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Drawing a polygon for an area on the map (for example, New York)

Open ReinisV opened this issue 8 years ago • 2 comments

Is there a way to draw an n-point (where n is a very big number) polygon on the map based on an object returned by Places API? Basically, what I want is for my custom map to have this functionality.

When the user enters a location, it is retrieved using the Places API and then, if the entered location is not a specific address but rather an area (for example, New York), I want to be able to draw it. No matter how many points it has (and you can see that the New York area polygon has many, many points).

In the Wiki I've only found ways to put down specific markers or draw custom polygons, but these areas seem to be completely different objects drawn diffrenetly than regular polygons.

ReinisV avatar Mar 10 '16 08:03 ReinisV

So this never got answered... I need this functionality if I will use @agm...

Methodician avatar Dec 01 '17 02:12 Methodician

Hi, yeah, I remember having this issue way back in 2016 (seems like a whole decade ago :) ), I did not solve it, i. e. this library does not have functionality to do that (and knowing the current state of AngularJS, it most likely never will).

I have not really investigated this, but I do not think that any gmaps library for any frontend framework provides this capability, and this is because the google maps API itself does not provide this capability in any way (at least I've not seen it in their docs). So possibly you can have better luck investigating other map APIs?

ReinisV avatar Dec 01 '17 06:12 ReinisV