My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 109: Feature: Automatic polygon generation to specified geographic boundary (e.g. state, country)
170 people starred this issue and may be notified of changes. Back to list
Status:  NeatIdea
Owner:  [email protected]

Blocking:
issue 7930


Sign in to add a comment
 
Reported by pamela.fox, Feb 2, 2008
Feature: Automatic polygon generation to specified geographic boundary
(e.g. state, country) surrounding a given coordinate point.

Comments: I'm looking for a way to apply colors to geographic-boundary
areas such as states and countries, to generate zoomable color maps showing
quantities in each area by color (e.g. population, rainfall, pollution
levels, etc.). This isn't necessarily a GPolygon modification, but some way
to simply designate a geographic area and a color would be really useful.
Perhaps GPolygon could include a method to specify a coordinate point
within a known boundary, the type of boundary (county, state, country,
continent), and color.

Requested by: Axlq
Feb 5, 2008
#1 [email protected]
Is the current work around for developers trying to do this to use GPolygon, and
specify the points of the country (or other politcal boundary)?
Feb 6, 2008
#2 pamela.fox
(No comment was entered for this change.)
Labels: Supported-1
Feb 7, 2008
#3 pamela.fox
William - Yes. There's public data available for many places. I personally use MyMaps
to draw simplified borders and then convert the KML output to JS GPolygon statements.
Mar 11, 2008
#4 [email protected]
I read somewhere (on usenet, sorry no url to hand) that the gpolygon approach could
run pretty slowly. I'm wondering how well it would work if I wanted to show a full
world map with countries on it. The commenter on usenet suggested that the best
approach from a performance PoV would be to use multiple image overlays for the
countries from a map server.

I'm not particularly bothered about very precise shapes as I'd probably want the map
to have a fixed viewport, but would need to have good control over the colours of the
shapes (e.g. hex values)

I can see some potential problems with finding a "definitive" list of countries
(perhaps there's an ISO list to use), but nothing insurmountable.
May 31, 2008
#5 pamela.fox
(No comment was entered for this change.)
Labels: ApiType-Javascript
Jun 11, 2008
#6 [email protected]
This would be nice! Google has the data for use in Google Earth, but perhaps it 
can't give it away to us too?
Sep 29, 2008
#7 pamela.fox
(No comment was entered for this change.)
Labels: -Priority-Medium Internal-1403119
Mar 7, 2009
#8 [email protected]
It would be nice to be able to use such maps as clickmaps: click on blue-colored Alabama, say, and be taken to 
wherever I have it linked.
May 20, 2009
#9 [email protected]
Yes, I for one would love to have access to the hierarchical data that Google uses 
internally for geocoding or otherwise: world / country / state / ... and including 
the borders of whatever entity we're looking at (e.g. country, region, county, 
town...).

Exposing this data through an API would be a major improvement as far as I am 
concerned. For accuracy's sake it would be important to know when the data was 
verified to be correct and from which source (where possible).

A second (huge) step would be to offer an advanced version of this API by specifying 
a date parameter where the country's boundaries would be given for that date 
(supposing we're querying for a country). Of course historical data may be incomplete 
and there needs to be a mechanism to point out the known limits of the dataset. This 
would allow for building a gradually more comprehensive dataset without the 
unrealistic expectation of it being 100% complete from day 1, or any time thereafter.

To mitigate potential conflicts, the dataset could include factual data showing which 
states officially recognise which borders and which states (or towns where town 
boundaries are concerned...) refute given border claims from other states as far as 
known to dataset experts at a given point in time.
May 24, 2009
#10 pamela.fox
Changing status of "Accepted" issues to "Acknowledged", to clarify their 
state.

We may not be able to resolve all bugs or fulfill all feature requests, but 
we do thank you for filing them, and we will continually revisit all 
acknowledged issues and evaluate their feasibility. Thanks!


Status: Acknowledged
Dec 15, 2009
#11 [email protected]
Adding my vote. Adding our own polygons also means multiple polygons for countries 
comprised of multiple land parts, such as island nations. 
Feb 17, 2010
#12 [email protected]
Please bring the boundary data available in Google Earth to the Google Maps API.  This 
would be extremely helpful when presenting state/country information.
Jun 29, 2010
#13 [email protected]
(No comment was entered for this change.)
Labels: -ApiType-Javascript ApiType-Javascript3
Jun 29, 2010
#14 [email protected]
(No comment was entered for this change.)
Owner: thor.mitchell
Jul 1, 2010
#15 [email protected]
(No comment was entered for this change.)
Mar 24, 2011
#16 [email protected]
This is a very old request but hopefully still on the drawing board. I think it should just be an extension of the geocoding API to return polygon coords or a google maps polygon object.
May 24, 2011
#17 [email protected]
This feature should be a part of api. please take it into consideration..
Nov 2, 2011
#18 [email protected]
Very very very interesting feature. Hope will be available soon.
Thanks!!
Dec 1, 2011
#19 [email protected]
Would be nice, if the geocoding functions could return a polygon, for any element. Now in Google web search if I search for a street's name, sometimes a small map comes up, with the street highlighted.
Dec 20, 2011
#20 [email protected]
i would like to use this feature on our site !
Feb 10, 2012
#21 [email protected]
 Issue 3919  has been merged into this issue.
Jun 29, 2012
#22 [email protected]
 Issue 2582  has been merged into this issue.
Jul 25, 2012
Project Member #23 [email protected]
(No comment was entered for this change.)
Labels: -Supported-1 -Internal-1403119 Internal-6881659
Jul 30, 2012
#24 [email protected]
(No comment was entered for this change.)
Sep 21, 2012
#25 [email protected]
nothing new?
Sep 28, 2012
#26 [email protected]
I create a javascript function and variable declaration for each state of the union.  HTH.

http://georgetowndctechie.blogspot.com/2012/09/cognos-10-and-google-maps-2-add-state.html 

Aug 29, 2013
#27 [email protected]
Hi, i have to represent countries on the map in different colors.

Please add the possibility to set the color and/or outline of each country by his ISO-Code.

Greetings, Christian.
Jul 7, 2014
Project Member #28 [email protected]
 Issue 5740  has been merged into this issue.
Jul 7, 2014
Project Member #29 [email protected]
 Issue 3955  has been merged into this issue.
Jul 7, 2014
Project Member #30 [email protected]
 Issue 6131  has been merged into this issue.
Dec 5, 2014
Project Member #31 [email protected]
(No comment was entered for this change.)
Jan 8, 2015
#32 [email protected]
Has there been any progress on this issue?
Jan 9, 2015
#33 [email protected]
please make it puplic by an api function. its already in online maps when you search for a postal code, why not in the api? :(
Apr 15, 2015
#35 [email protected]
Hi all,
Thanks for requesting this feature but disappointed to see that there hasn't been any update on this in such long time! Anyone working on this? should be simple now that it's already a feature in the maps.google.com.  


Apr 16, 2015
#36 [email protected]
You can get the polygons from OpenStreetMap.
Apr 16, 2015
Project Member #37 [email protected]
(No comment was entered for this change.)
Status: NeatIdea
Apr 26, 2015
#38 [email protected]
 Issue 7922  has been merged into this issue.
Apr 27, 2015
#39 [email protected]
Is it possible to display boundaries (city, state, zip, neighborhood, school ...) on a Google map using the Maps API without having to use supplementary data? We would like to use Google's up-to-date boundary data rather than using their existing, manually updated data in order to maximize efficiency and ensure accuracy. A search on maps.google.com results in a polygon outlining the zipcode boundary-- is it possible to achieve the same action and result with Maps API?
Apr 28, 2015
#40 [email protected]
We're also in need of neighborhood boundary polygon data. When is Google going to provide it as part of the geocoding API? Any ETA? Please, advise!
Jun 1, 2015
#41 [email protected]
Duly Noted! Would be super helpful to have this data available :)
Jun 1, 2015
Project Member #42 [email protected]
While this doesn't answer everyone's use-cases, you can use the Embed API to embed a map on your page that shows the outline of a single region.

You can see it in action in the Embed wizard here: https://developers.google.com/maps/documentation/embed/start
Jun 5, 2015
#43 [email protected]
The embed API is almost usable for this, the problem is when you use it in view mode to show a place then it places a big white infobox on the map which is unnecessary for this usage (showing a city/region highlighted on the map) and cannot be hidden using the API.
Jun 7, 2015
#44 [email protected]
Correction: in the previous comment I wanted to say place mode, not view mode. Could you add an option to place mode of the embed API to hide the white infobox, until support for higlighting regions added to the JS api?
Jun 8, 2015
Project Member #45 [email protected]
Great idea - I think it's different enough from this request that it should live in it's own feature request. Add a new FR for the Embed API here and I'll file it internally: https://code.google.com/p/gmaps-api-issues/issues/entry?template=Maps%20Embed%20API%20-%20Feature%20Request
Jun 9, 2015
#47 [email protected]
@ developer [email protected]:
your suggestion looks nice, but it is not usable to display own colors and such. where i would like to use it for, is when i have a database with a certain number connected to each province, postal code region, or city, i would like to display that in a map with different colored poly fill areas. if i search for this:
https://www.google.nl/maps/place/1687+Wognum/@52.6833955,5.0216724,14z/data=!3m1!4b1!4m2!3m1!1s0x47c8ac07758330e9:0x34b695ef00a873fd?hl=nl
this is the area i would like to use as a polygon to do with whatever i want.
Why is it so difficult to just connect the areas you allready have, to this api: https://developers.google.com/maps/documentation/javascript/examples/polygon-arrays
Jul 2, 2015
#48 [email protected]
could a google developer please let us know why they dont provide us with this? its allready in maps.google.com for a long time now, only not in the api :(
Jul 2, 2015
#49 [email protected]
+1, as an alternative the maps api could have a function which returns polygon data for a named geographical area. This way we could do then drawing of the polygon ourselves and the maps devs should only add this function which returns the polygon data which is already available in the backend.
Aug 6, 2015
Project Member #50 [email protected]
 Issue 8441  has been merged into this issue.
Aug 6, 2015
Project Member #51 [email protected]
 Issue 4442  has been merged into this issue.
Aug 6, 2015
Project Member #52 [email protected]
 Issue 8442  has been merged into this issue.
Aug 6, 2015
#53 [email protected]
http://www.29travels.com/map.php has polygons for each country but you need to add the coordinates in a database.  view source code and the kml file to see the coordinates.  agreed that this would be great if added through API. 
Aug 6, 2015
#54 [email protected]
That are only country's, I need postal codes, city's, provinces, etc
Aug 6, 2015
#55 [email protected]
+1 What's the status on this? Will we ever have the ability to have access to say, neighbourhood boundaries and style them (line, fills, etc)? Or maybe have direct access to the polygon boundary data?
Aug 6, 2015
#56 [email protected]
Pfff, come onnnn devs... the data is there already, only make it available...
Aug 8, 2015
#57 [email protected]
Hi,

We are developers working on Google maps.

We are trying to display multiple locations along with Google maps provided boundaries in a single map. But we are not able to mark multiple locations along with boundaries in a single map search as depicted in the screenshot provided. We are looking for a solutions for the same.

Best regards,
-Perumal 
google-map-multple-location-markep.png
738 KB   View   Download
Aug 17, 2015
Project Member #58 [email protected]
 Issue 6786  has been merged into this issue.
Aug 17, 2015
#59 [email protected]
we're all waiting for it  mcorcu...
Aug 17, 2015
#60 [email protected]
I don't get it what takes so long when all the data is available already. This is a 7 year old request.
Aug 17, 2015
#61 Al.Rech
Yep, 7 years... I've abandoned my GMaps project 5 years ago...

BTW, how to stop receiving notifications from this thread? I've unstarred it and turned off all notifications in https://code.google.com/hosting/settings a long ago, but I still keep receiving emails (and that drives me mad sometimes).
Aug 17, 2015
#62 [email protected]
there is a google user in charge of this topic, [email protected], but i can not see his whole address. but when i open his google code profile, i see he's in an other team also, so i mailed the leader of that google code team, [email protected], if he knows who [email protected] is and if he could point someone to this topic. that was 7 days ago... hope i will get a reply...
Bart
Aug 18, 2015
#63 [email protected]
just got responses from the maps api team on twitter, hope they will look again at this...

‏@VolgensBartjes  16h16 hours ago
@GoogleMapsAPI who's in change of this issue? https://code.google.com/p/gmaps-api-issues/issues/detail?id=109&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal … no update to us in 7 years

Google Maps API ‏@GoogleMapsAPI  13h13 hours ago
@VolgensBartjes We've categorized this issue as a "NeatIdea". You can see a full list of our categories here: https://goo.gl/lqaZFA 

@VolgensBartjes  7m7 minutes ago
@GoogleMapsAPI thnx, didn't seen the categories, just looked, its in the top5 starred, and in the discussion we alle think its not that  hard to do, because its allread available in the normal google maps, so the only thing that needs to happen seems to be  the connection to the public api's...

@VolgensBartjes  1m1 minute ago
@GoogleMapsAPI oh, and its also one of the most old ones....

‏@VolgensBartjes  15s15 seconds ago
@GoogleMapsAPI so, maybe the could be a re-evaluating of the issue?

Aug 25, 2015
#64 [email protected]
need this information on api 
Aug 26, 2015
#65 [email protected]
In our application a user needs to choose a place/location based on his autocomplete search. Without visible borders (like the one's on the maps.google.com) it's not clear to the user if he chose the right autocomplete suggestion. 

For example: He is looking for "Zurich, Switzerland" (the canton). Because he sees the borders of the city Zurich he knows he selected the "wrong" Zurich and can adjust his search to "Canton of Zurich, Switzerland" and select the correct one.

In short: Please add the feature to show/hide location borders, just like the ones already shown on maps.google.com
Sep 29, 2015
Project Member #66 [email protected]
 Issue 4094  has been merged into this issue.
Oct 14, 2015
#67 [email protected]
Hi everyone, are there any news about the implementation of this feature in the current Google Maps v3 API?
Oct 14, 2015
#68 [email protected]
HI All,

just a suggestion.
you can get polygon too from Open Street Maps.
they provide an API called nominatim.

just a sample: http://nominatim.openstreetmap.org/search?format=json&q=Tokyo,%20Chiyoda,%20Tokyo,%20Kanto,%20Japan&polygon=1&limit=2
Oct 14, 2015
#69 [email protected]
As its taken so long, its probably not a technical issue, but rather legal. Such an API would be ripe for abuse (using it to download every county in the world or something) - and Google probably dont own all the data be able to make easily available. 
Oct 14, 2015
#70 [email protected]
Why should it be a legal issue when it could simply work by using the area's name or its ISO code?

e.g.

api.highlight('FR')

or 

api.highlight('France')

There is no need to give out the actual polygon data, the area could be highlighted by simply naming it, as it works with regular Google Maps where when you can search for a country or something and then it's highlighted.
Oct 18, 2015
#71 [email protected]
@[email protected] for some cases that would be enough, but most developers wants the polygon data so you could draw other colors on the map. also not only countrys with their codes are available at google, but also more region specific things, such as postal code areas here in the netherlands: 
https://www.google.nl/maps/place/1687+Wognum/@52.6833903,4.9865671,13z/data=!3m1!4b1!4m2!3m1!1s0x47c8ac07758330e9:0x34b695ef00a873fd?hl=nl
Oct 18, 2015
#72 [email protected]
The api can support styling too, e.g. passing in colors:

api.highlight('FR', 'red')

And ISO codes also cover subdivisions within countries, AFAIK.

Anyway, let's see some api first, then it can be gradually improved, supporting more styling options. I don't think they'll give out polygon data for legal reasons, so it's much more feasible to request an api which supports addressing named regions.

I agree polygon data would be the best, but if it's not available then the second best things is an api which higlights regions by name or ISO code.
Oct 18, 2015
#73 [email protected]
Woud be Nice than to give html colors for the boundary line and color and opacity for the filling. And if they make this, I hope you can just use every search term that's possible in Google too, like postal codes and villages...
Dec 28, 2015
Project Member #74 [email protected]
 Issue 9063  has been merged into this issue.
Dec 28, 2015
#75 [email protected]
This is a good idea. Same would be for cities and streets, and it could also be nice to be able to zoom to all that are marked in such a way (so that all will be shown to the user).
Jan 13, 2016
#76 [email protected]
While we still wait for this feature to be implemented, please check out the same issue for static maps. If this feature could also be useful for you in static maps then please star that issue too:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=7930&q=apitype%3AStatic%20type%3AEnhancement&sort=-stars&colspec=ID%20Type%20Status%20Summary%20Internal%20Stars
Feb 9, 2016
Project Member #77 [email protected]
Issue 7930 has been merged into this issue.
Feb 10, 2016
Project Member #78 [email protected]
(No comment was entered for this change.)
Blocking: gmaps-api-issues:7930
Feb 29, 2016
#79 [email protected]
Having been playing with geometries of country/states/cities, I gained a little more insight on this topic and why the API will probably not have it any time soon.

The issue is that the amount of data (to be read as coordinates) involved is, in a lot of cases, simply staggering. Returning the boundaries as a Polygon (or MultiPolygon) would be infeasible. For example the MultiPolygon that defines the geographic boundary for Germany is ~3MB. So, including this into an API response will increase many times over the data transfer and, obviously, time required from the user end. Not to speak about what it will do to the API servers :D

So, if that wouldn't work (and if it was me it wouldn't) the other possible way is to make a separate request to get the boundaries so you can draw your polygons. It wouldn't solve the size and time issue (so your users will still wait for a while to see the boundaries drawn), but it wouldn't slow the geocode, reverse geocode, etc. requests. But in that case, there is no consistent method (at the moment, and as far as I am aware) to clearly specify which boundaries you actually want. For that to work consistently, we would have to be able to clearly address a state or a city by a unique identifier. If that would work with the Places ID, it would solve that, but I found Places ID to be inconsistent for such use cases.

Which leaves, in my opinion, the only option of requesting tiles with the boundaries already drawn. Now, obviously, these are cached and exist somewhere since they are shown on Google Maps. And this could work pretty neatly with viewport biasing. But this would make those boundaries just a picture, so, not interactive, which sort of defeats the purpose in the end, but it would still be nice to be able to get those tiles.
Feb 29, 2016
#80 [email protected]
By passing a zoom level it shouldn't be hard to get simplified polygons, here's how it works in PostGIS:

http://www.bostongis.com/postgis_simplify.snippet
Mar 1, 2016
#81 [email protected]
yes, as batch... said, i couldn't imagine that when you visit https://www.google.nl/maps/place/Duitsland/@51.0778957,5.9597175,6z/data=!3m1!4b1!4m2!3m1!1s0x479a721ec2b1be6b:0x75e85d6b8e91e55b?hl=nl that he's download 3mb of polygons?
Mar 1, 2016
#82 [email protected]
you can also see the polygons change when zooming in and out. so what cipva... discribed, thats not the problem...
Bart
Apr 2, 2016
#83 [email protected]
(No comment was entered for this change.)
AuthenticationService.Authenticate
48 bytes   Download
Sign in to add a comment

Powered by Google Project Hosting