angular-ui / angular-google-maps

AngularJS directives for the Google Maps Javascript API
http://angular-ui.github.io/angular-google-maps
2.52k stars 1.07k forks source link

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

Open ReinisV opened 8 years ago

ReinisV commented 8 years ago

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.

Methodician commented 6 years ago

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

ReinisV commented 6 years ago

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?