kml

With Google Maps API V3, determine if a marker is inside a KML Layer boundary

时光怂恿深爱的人放手 提交于 2019-12-02 22:59:59
Is there a way to determine if a marker has entered an area covered by a KmlLayer? My .kml is mostly made up of a <Polygon> with a bunch of coordinates that define the boundary. There is an article I found that describes some similar to what I'm looking for, created using an overlay: http://www.paulmcilwaine.com/api/google-maps-detecting-markers-in-a-particular-boundary That method has the advantage of using getBounds(), but I am looking for a way to do this with a KmlLayer boundary. KmlLayer doesn't seem to have a handy function like getBounds(), but I do have all the coordinates available to

How can I send a kml file to Google Earth, like MyTracks (open source) do?

て烟熏妆下的殇ゞ 提交于 2019-12-02 19:49:11
I don't know if you have seen the amazing Mytrack update, but it allow to send a kml file to Google Earth app and display it inside the Google app (if installed, of course). The source code is there: http://code.google.com/p/mytracks/source/browse/ but I cannot find the way to achieve such a thing. I think I found something here: http://code.google.com/r/jshih-mytracks3/source/browse/MyTracks/src/com/google/android/apps/mytracks/io/file/SaveActivity.java?spec=svn5178eb75934b7f0c4c23ec26b7d79a0787de18b8&r=5178eb75934b7f0c4c23ec26b7d79a0787de18b8 else if (playTrack) { Intent intent = new Intent(

KML Layers rendering order google maps

拜拜、爱过 提交于 2019-12-02 16:23:27
问题 I have noticed some different behavior with the following APIS <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> http://jsfiddle.net/x8dSP/2062/ Sometimes the polygon layer renders ontop of the balloon layer, and sometimes the opposite. It seems like after the map is "cached?" in the browser it will render with the polygon layer ontop. Is there anyway to prevent this? Or to have one layer always be in the background? Unfortunately I cannot map these layers

highlight a polygon while on click using kml

余生长醉 提交于 2019-12-02 15:11:56
问题 I am using kml file to draw polygons in google map. I am setting click events for those polygon which is working. Now I want the clicked polygon to be highlighted. I had tried the setOption() method, but it didn't work. Is it possible to change the color of polygon on clicking it? 回答1: If you are using KmlLayer (a guess), you can't change the properties of the Polygons. If you use a third party KML parser like geoxml3 or geoxml-v3 to render the polygons as native Google Maps API v3 objects

Google Map API v3 displays only 5 layers

本小妞迷上赌 提交于 2019-12-02 12:57:38
问题 Simple calls with 10 KML files we have only 5 displayed. It was working for couple months and suddenly stopped (on May28, 2012). var map = new google.maps.Map( document.getElementById("map_canvas"), myOptions); ... var p1 = new google.maps.KmlLayer("http://domain.com/DLAYYZ.kml"); p1.setMap(map); .... var p10 = new google.maps.KmlLayer("http://domain.com/A70BR2.kml"); p10.setMap(map); ... <body onload="initialize()"> <div id="map_canvas"></div> If I use Network Links then I'm able to display

Show Value next to line in google maps

醉酒当歌 提交于 2019-12-02 11:17:54
I've created a KML file with lines corresponding with roads (see the picture for 1 road/link). I changed the linewidth and color to distinguish types of the roads. I've got 2 questions about the layout: 1) I would like to add and rotate a value along the line. Is that possible using KML file or have i use another method (like 4.32 in the picture)? 2) Is it possible to show the end cap of a line as a 'square' ? (default in my KML is rounded) Thanks you so much! Example (question 1): For #1 you can add an InfoBox with rotated text along the polyline. For #2, there is no option to modify how the

Open Google Earth and load specific KML file when user clicks link on web page

早过忘川 提交于 2019-12-02 10:59:39
问题 I'm currently working on a site which displays map data in Google Maps, but also has a link to display it in Google Earth. To get view this data in Google Earth, a user clicks the link, downloads the file, then opens the file with Google Earth. Is there a method to automate this, so that a user can click the link and the file is automatically opened in Google Earth, similar to the iTunes web store? I've searched through the documentation to little avail. 回答1: No, you can't force the users

Simplexml XPath strangeness

大城市里の小女人 提交于 2019-12-02 10:48:03
问题 I'm writing a script which reads and manipulates a KML (xml) document. Below is a snippet of the document I'm reading: <?xml version="1.0" encoding="UTF-8"?> <!-- Generated by Feature Manipulation Engine 2009 (Build 5658) --> <kml xmlns="http://earth.google.com/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> <Document> <name>South Australia</name> <visibility>1</visibility> <description><![CDATA[Statistical Local Area 2008]]></description> <Folder id="kml_ft_SA_SLA08"> <name>SA_SLA08</name

android url to access KML route

不想你离开。 提交于 2019-12-02 09:42:45
问题 I am trying to draw path between two points on google map using url below, http://maps.google.com/maps?f=d&hl=en&saddr=13.005621,77.577531&daddr=13.005621,77.579531&ie=UTF8&0&om=0&output=kml before it was working properly, but now it shows exception, I/System.out(461): Unexpected end of document doc is returning null why? my code is bellow, http://pastebin.com/XvR0rYdQ thank you 回答1: These links help u to code for maps: MAPS Tutor Maps Location Maps Api If u want url only then use this : http

Why not doesn't Google maps view the kml layout?

可紊 提交于 2019-12-02 09:39:59
I do this tutorial . I copied the source code from here. I use the similar .kml file too! <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> <script> function initialize() { var chicago = new google.maps.LatLng(41.875696, -87.624207); var mapOptions = { zoom: 11, center: chicago, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var ctaLayer = new google.maps.KmlLayer({ url: 'https://de-ik-kml.googlecode.com/svn/trunk/cta.kml' }); ctaLayer.setMap(map); } google.maps.event.addDomListener