Google Maps kml files - google-maps

If I use an embeded google map in my website, will the data contained in an kml displayed be publicly viewable?
Will it be possible for the user to access just the data displayed (i.e., not the user interface) or would I have to provide that separately?

If you load your KML through the API, with GGeoXml(), (V2), or KmlLayer(), (V3), then your data needs to be in a public server because it is parsed by Google's servers and they need to be able to get to it. If you load it with a third party extension then you can keep it private.
Third party extensions that can load and parse KML data are EGeoXml() by Mike Williams
http://econym.org.uk/gmap/extensions.htm#EGeoXml
and GeoXml() by Lance Dyas
http://www.dyasdesigns.com/geoxml/
but I believe that both of those are only available for the API V2 for now.

I just upgraded my Google Maps JavaScript API Application from v2 to v3, following these instructions.
My v2 application was using the EGeoXml extension referred to by #Marcelo in the accepted answer to locally parse KML data.
A substitution of geoxml3 in its place, as suggested by #geocodezip (a contributor to the project) in a comment, functioned immediately in my v3 application.

No, the data will not be public. I'm not sure about your other question though.

Related

Is there any API to get metadata schema for Google Drive rest API

On Google Drive documentation I could see schema for individual resources like File,Permissions etc but no where mentioned about API for meat data of all resources.
The Discovery Service API is an interesting if little known API it gives you all the information you could ever need about Google APIs.
If you take the following command and place it in a web browser you will see everything you could ever want to know about the Google Drive API v3.
https://www.googleapis.com/discovery/v1/apis/drive/v3/rest

Google Maps will not load KML layer from my site

I have a site that contains kml. The kml is shown as a layer in Google Maps. The maps are on the same site. Until recently (may 12th), this worked fine, but now it stopped working. The kml itself is OK, it can be used in Google Earth. When I copy the kml to another site I can load it in Google Maps without any problem.
Is it possible that my site is on a "blacklist" for some reason? Traffic is low. I did not use an API key. I do now but that did not solve the problem.
You can see the difference here:
1 - with kml from my site
2 - with kml placed elsewhere
The first one fails, the second one works. The kml placed elsewhere is an exact copy of the kml from my site. The kml from my site is served with media-type application/vnd.google-earth.kml+xml. It is dynamically generated.
In my case i got FETCH_ERROR on kml status-
Because my site allow only tls 1.2 secure connection.
When i put the files on another server- it's work.
Update 1-
It happend again after sometime, this time use the same domain helped.
from the Google Maps 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.
Both are valid, the one that doesn't works returns a KmlStatus of FETCH_ERROR. As a guess, I would say that the dynamic generation is taking too long. But there might be some security on your server that is preventing Google's server from fetching it.
from the documentation
FETCH_ERROR The document could not be fetched.
from your site
doesn't work with Google Map KmlLayer
Returns KmlStatus: FETCH_ERROR
Works through a proxy with the third party parser geoxml3
placed elsewhere
works with Google Maps KmlLayer
The problem automagically solved itself by waiting a few days. We can only guess what caused it, maybe a temporary glitch on our server which caused Google to stay away for a while and/or sploil it's cache. Anyhow, thanks for the reactions, at least I learned something about testing my kml.

Extract raw data from google maps

What data can be extracted from google maps? It seemed to me that I can just poll information about places and geography through their api. I'm looking to pull down a map of a city from google maps and then make my own map from it in order to throw that data into a game engine. A brute force method would be extracting the bitmap images and then processing that information, but is there some standard of geographical information I should explore? And if so, can I get that information from google maps?
If you want your own copy of a map you might be best off looking at Open Street Map, the Google TOS will likely dissallow the use that you are looking for, while OSM is open source and you can download the entire data set at will should that be your desire.
For mapping applications I would look into QGIS, it's again free and a powerful tool.
You can extract datasets and metadata from Google Maps Engine for use on other platforms. You can use the Google Maps Engine API to programmatically access and download data and metadata/configurations from your Google Maps Engine account. This approach is best when you need to download a larger number of data sources from your Maps Engine account or if you’ve updated vector tables using the Maps Engine API.
To download data with the Maps Engine API, your application must handle OAuth 2.0 for authentication as well as the calls to retrieve data via the GME API.
So far the easiest solution in the data extraction industry is to use a Google Maps Web Scraping Template.
Google Maps web scraping template
is an advanced feature of the industry-leading free data extractor Octoparse. They built dozens of templates covering all popular websites, which are ready to use preformatted crawlers. You can use it to extract the business name, reviews, ratings, address, websites, phone number, and open hours, etc.
If you think the template doesn’t meet your needs, you can build your own crawler to extract other information.
Other advanced solutions to extract google maps data include using open-source projects on Github, using python framework/library, use a web scraper chrome extension, etc.
You can check out this article 5 Free Google Maps Data Extractors

Google Earth loads KML 2.2 but not Google Maps

The Google maps script I have seems to load the example KML from Chicago files fine, but when I add my own, it fails. The KML standard is 2.2 - why doesn't Google Maps manage to read it (Google Earth seems to work fine)? When I tried to validate the file it said there were some errors - is there any way around it given that this is an output I get from an application?
geoxml3, KmlLayer and Google Maps load your kml for me. My server doesn't support KML with the .kml extension, just as XML with the .xml extension because it isn't configured for the KML/KMZ MIME types, you might have the same problem on your server.
See this issue on the Google Maps API v3 issue tracker regarding the "spikes" on the line.
Another option would be to to see what KmlLayer.getStatus() returns (Kml Status:DOCUMENT_NOT_FOUND). The cta.kml example returns Kml Status:OK.

Migrating to Drive SDK from DocumentsList API V3

I just came to know that DocumentsList API is depricated. So i thought of migrating my app to Drive and saw this page. I mostly use urls like https://docs.google.com/feeds/default/private/full/. So is it enough to replace them with new URL's like this https://www.googleapis.com/drive/v2/files/ ?
Just wanted to confirm is that all i need to takecare or am I missing anything. My App uses OAuth2 for authorization. Do I need to change anything in there too?
If you are constructing the requests yourself, you have to replace the URLs but also take into account that the responses from the Drive API will be JSON-formatted and not XML-formatted as in the Documents List API.
If instead you are using one of the Google-provided client libraries, you have to start using a newer client library, that you can download from https://developers.google.com/drive/downloads.
The migration guide is mostly a guide that maps methods from the Documents List API into methods of the Drive API and should be used as reference to know what is available and where.
Oauth 2.0 is fine. You can even use the same tokens you already have for Documents List v3.