In my application I would like to display a kml file over the google maps using google map api v3.
While I was searching for the solution I came across geoxml3, BUT i don't really understood its use and for what is used.
Can anyone explain if its the solution to use geoxml3 to overlay kml file stored locally in my application.
Or else what is the main use of geoxml3?
The Google Maps API v3 method for displaying KML (using tile based rendering) is KmlLayer
Developer's Guide (including examples)
geoxml3 was developed before KmlLayer was released, it parses KML to native Google Maps API objects (losing the benefit of tile based rendering, but allowing access to individual objects)
KmlLayer requires the KML be accessible by Google's servers. If the file is local, geoxml3 can access local files (under some conditions, with some browsers) and render them on a Google Map, but remember, unless you have a Business License, to meet the terms of use, your map must be publicly available (or you app must be, IANAL, read the terms for yourself).
geoxml3 is a KML processor for use with the Google Maps v3 API. It allows you to render KML data on a Google Maps application. This KML data can be used to generate markers, polylines, or whatever other objects you wish.
Related
I would like to make a script that:
Creates a Google Map (daily)
Adds placemarks through Lon/Lat in a CSV-file
Saves the map (and make it public) to my Google Account.
using the Google Map API. This is very easy to do manually but is it possible to do using the API? I can only see how to add a Google Map to your website, and the likes of it.
Let's say for example that I want to make a daily map of armed robberies in the USA. I have a CSV file with all the locations (as Lon/Lat). I want to create a map at 0.01 a.m. that can be shared on social media (for example using Twitter API to share the location of that map). I do not want to use a website in the process.
Is this possible? How can I do that? I am using Ruby on Rails but I am more interested, at this point, to see how this can be done in any script or pseudo-code.
I have requirement that is, I have to show GeoJson data (java script file) as a layer in Google maps either using Native or Web view. I have checked few forums, as per they said, it is possible only for Android to load java script for loading data layer in Google maps.
So, my requirement is, I want to show some java script which contains geojson data as layer and then after that, I have to draw a route or path from start point to end point in map(like user started walking from 1 place to other place around 1 to 10 kms like footsteps).
I seen in Google maps forum, only Android and Web possible this kind requirement.
And I have checked MapBox library too, I am not sure whether it will help to my requirement. But, my preference is Google Maps.
Anyone can suggest me how to achieve this?
Is there a way to display (and search in markers data) "my maps" layer in a GMSMapView in the Google maps SDK for iOS? Searched docs but couldn't find.
"my maps" are basically custom maps with additional layers you can create on top of a google map region, I want to use a public one that has tons of layers and markers already in place (I do not want recreate them programmatically).
basic example for "my maps" data:
https://www.google.com/maps/d/viewer?mid=zRF3RCwWPTMg.k8Zh-QyncJYc
thanks!
Unfortunately it looks like there is no API for accessing My Maps, see here:
Google maps API - get my custom map
However, it looks like it's possible to convert your My Map into KML, either a one-time download or a live link to the current map content, see here:
https://support.google.com/mymaps/answer/3109452?hl=en
(I found this via Add Google "My Maps" Layer to Google Maps Javascript API, although the UI to get the KML has since changed from that answer in 2009).
Once you have the KML you can't add it directly to your map, but you can parse it and then add each of the markers etc, see here:
How to load a KML file URL into Google Maps using iOS API?
I want to display data from kml file, which is situated here http://maps.google.com/maps/ms?f=q&msa=0&output=kml&msid=201434694813577429889.0004ba2d12b7538131e5e .
It is output from MyPlaces. I want to do more stuff with it - change icons, use clustering and so on, so embedding is not good solution.
I've tried to load the file using KmlLayer in GoogleMapsApi, which works, but I don't know, how to change icons and how to get data for each marker (coordinates, description, ..).
Actually, what I need is just the access to the data in kml, I am able to do all other programming on my own. The file is continuously changing so I need to do all the stuff online.
You could use a 3rd party KML parser (through a proxy) like geoxml3 or geoxml-v3. They render the KML using native Google Maps Javascript API v3 objects, you can modify those using the Google Maps Javascript API. When you do that you lose the benefit of KmlLayer's tile based rendering, so with complex KML, you may have performance issues.
example with your KML (seems to have a character encoding issue)
I'm currently developing an app that needs to display a map of where the user is currently located in the world. For technical reasons, I need to access every map tiles as an image (png/jpg) before going in the rendering pipeline.
I have tried 3rd party services like MapBox, MapQuest as they have a REST api that enables me to receive a png/jpg of a tile according to the requested location. The issue here is that MapBox isn't free, so I was wondering if there was a way to access the tiles that Apple provides in it's maps app. What service are they using under the hood? Would I be violating some terms of use by going with this approach.
Please note that using some integrated "do-it-all" UIMapView is not an option for me, I need the image directly.
Thanks
Google has a REST API. You can see the details here https://developers.google.com/maps/documentation/staticmaps/?csw=1. It does cost money if you go over the usage limits.
I manually download Map Tiles for my app, but I don't use MKMapKit. I have my own MapView and I am using a combination of MapBox, Thunderforest, CalTopo, OSM, and map tiles that I generated and host on AWS. All of them have a pretty easy map tile URL scheme, but you do have to pay for most of them.