Caching polygons on google map - google-maps

have successfully rendered polygons in google map. I want to save them for offline use.
Is there a way to cache polygons on google map and use them later ?

https://developers.google.com/kml/documentation/kml_tut
Google provides the kml-Format for such glorious things.

Related

Google Autocomplete Polygon as GeoJson

I'm trying to find in the Google Maps documentation a way to search for a place and get it's GeoJson polygon but I got no luck finding something like that.
My goal is to create a search bar to search places and then send the geojson polygon to our back-end. I don't want to draw it on a map or anything front-related.
Nominatim is doing exactly what I want but Nominatim policy is very restricted so before I go for an alternative, I wanted to check if Google Maps could provide the same (especially since searching for a country on Google Maps retrieve the polygon and draw it on the map).
Thanks for your help !
Unfortunately Google Maps APIs don't expose any polygons data of geographic features. You can see very old feature request in the Google issue tracker to add this functionality, however it looks like Google didn't set high priority on this task:
https://issuetracker.google.com/issues/35816953
Feel free to star the public feature request to express your interest and subscribe to further updates from Google.
You should get polygons from other sources.

Google Maps q parameter for adding a KML with URL stopped working

On our website we have several map previews for various KML datasets. When clicking the preview button the link would go to:
http://maps.google.com/maps?q=http://magic.lib.uconn.edu/magic_2/vector/37800/statect_37800_0000_2010_s100_census_1_kml.kmz
which would show a map with the overlaid KML file.
Support for this syntax from Google Maps apparently has stopped working recently, and I cannot find any new information about adding KML layers to a Google Map using the q parameter in a URL. Most of the resources I have found are for JavaScript or embedding maps, which hasn't been helpful. I have also found this thread from StackOverflow (Why has google maps "q" parameter stopped working?) but this is related to a specific location rather than adding a KML file. If anyone has new information or can help, that would be greatly appreciated.
See KML files on Google Maps in the documentation.
From February 2015, maps created in the classic Google Maps — https://maps.google.com/ — will no longer load KML/KMZ files from external websites. However, we know that KML files are a really useful way to work with geographic data, so we’ve added KML to Google My Maps, and continue to support this format with other Google Maps APIs. We hope that one of these options will meet your needs.
There they only list:
Google My Maps
Google Maps JavaScript API
So if you can't use Google My Maps or the Google Maps Javascript API v3, you may be out of luck.
Another reference from "support" is:
KML content isn't available in Google Maps
While using Google Maps, you might have received a notification saying "Some custom on-map content could not be displayed."
That’s because a certain type of content isn’t available anymore in the classic version of Google Maps or in maps embedded on other websites from the classic version of Maps. The content type that’s no longer available is KML, the file format Google Earth uses for the exchange of geographic information.
If you're the owner of a custom map with KML content, you need to update your content. Or, you can import your KML content into My Maps.

Getting pins from a saved Google Map into v3 API

I have a saved google map in 'My Places', with over 100+ pins added for locations around the UK. Is there any way I can avoid having to use the embed feature to display this map on a webpage, sort of calling the saved map by ID via the google API?
Essentially what I want to do is get access to google's new visual refresh and be able to control the settings of the map more with API.
The map link is this: https://maps.google.co.uk/maps/ms?msid=207590858966548688521.0004aa52150024d3431b2&msa=0
Can we parse anything here...?
You can overlay the KML output by MyMaps using a KmlLayer in the Google Maps API also:
your MyMaps data displayed on an API based map
Updates in MyMaps will (eventually) be reflected on the map.
Using https://mapsengine.google.com I was able to import the maps data and utilise the pins that way. Not ideal, but still some better functionality.

Google maps (API v3) with kml layer. how to hide kml URL?

I would like to di splay a Google Map with a kml inside through API v3. the proble is that every one can see the url of the kml and easily download it. Is there a trick to 'hide' the .KML URL?
wikimapia.org seems to do something similar displaing kml polygons but if you check with Firebug through the script tag you won't see the kml URL.
thanks everyone for help.
A. from Italy.
You could generate it at run time, so that the server sends the page the URL. However, it is still discoverable at some point. Security through obscurity just doesn't really work. The KMLLayer Layer requires your KML to be on a public server. You could instead parse the KML and render it that way, say using egeoxml. However that delivers much less performance.

Add point polyline polygon in google earth

I want to develop a web-application using Google Earth in the browser.
I need to add a point feature, a polyline and a polygon.
The web-applicaton needs to display the features the same as the Google Earth desktop application.
I want to use the Google Maps Api and the Google Earth Api to deliver google earth in the browser.
How can I make this kind of application for myself, what is the best way for doing so?
You should look at the Google Earth Api documentation. http://code.google.com/apis/earth/documentation/reference/
Simple objects like points, polylines and polygons can be created via the api or loaded in Kml format. Take a look at the following documents.
Geometries and Overlays
http://code.google.com/apis/earth/documentation/geometries.html
Introduction to Kml
http://code.google.com/apis/earth/documentation/kml.html
From the sounds of it the KML approach might be the easiest thing - depending on the nature of the application. If you have some existing data in Google Earth, it would be easy to save this as a kml or kmz file and load it in to the Google Earth Api.