kml

colorise single track in kml file

倖福魔咒の 提交于 2019-11-30 14:24:31
I am trying to have a gx:track's line to have different colour in different part in the track depending on some conditions, but I am unable to find way to colour part of a track. I am using C# to generate the kml file. BTW my gx:track's has extendedData. I know I can apply lineStyle to the gx:track but that will only apply to the whole track, but I would like to have different colour along the track's line. Thanks in advance. Terry As previous answer says, you have to split track into segments and color each segment individually. There is no other way to do this using KML. But remember that

How to save map drawing state (Polygon, Polyline, Markers)

爱⌒轻易说出口 提交于 2019-11-30 14:22:45
问题 I want to enable drawing on Google Maps like (see this example) When user finish with drawings he will click on save button to save his drawings in Database or KML file, anything :) .. I do not know how to the save part? Could anyone help me 回答1: Here, http://jsfiddle.net/X66L4/1/ try drawing some circles, click on SAVE, then edit the circles by switching to the hand cursor and SAVE again to see the changes. I show an example to save circles' data, the main idea is to keep a global array for

Calculate lat/lng of corners of ground overlay from kml-file

你说的曾经没有我的故事 提交于 2019-11-30 13:33:38
问题 I need to find the corners in lat/lng of a ground overlay given in a kml-file either in php or javascript. I.e. for a specific example I need to get from: <LatLonBox> <north>60.406505416667</north> <south>60.400570555556</south> <east>5.3351572222222</east> <west>5.3190577777778</west> <rotation>3.7088732260919</rotation> </LatLonBox> to corner coordinates SW: 60.400316388889;5.3194425 SE: 60.400824722222;5.3355405555556 NE: 60.406759444444;5.3347738888889 NW: 60.406251388889;5.3186730555556

Google Maps HTTP API for driving and walking directions

北慕城南 提交于 2019-11-30 09:33:57
Do you know how I can get walking directions from Google by giving two specific coordinates? How can I send simple HTTP GET requests and have the result in a KML file? I don't want to geocode, but get the driving directions as the KML file returned by this method: http://www.gringod.com/2008/02/26/save-google-maps-driving-directions/ Daniel Vassallo There is no documented and approved method at the moment to access the Google Maps Directions API via an HTTP request ( update : Google added walking and driving directions via web services in May, 2010). Nevertheless, an undocumented method that

Calculate lat/lng of corners of ground overlay from kml-file

て烟熏妆下的殇ゞ 提交于 2019-11-30 07:41:43
I need to find the corners in lat/lng of a ground overlay given in a kml-file either in php or javascript. I.e. for a specific example I need to get from: <LatLonBox> <north>60.406505416667</north> <south>60.400570555556</south> <east>5.3351572222222</east> <west>5.3190577777778</west> <rotation>3.7088732260919</rotation> </LatLonBox> to corner coordinates SW: 60.400316388889;5.3194425 SE: 60.400824722222;5.3355405555556 NE: 60.406759444444;5.3347738888889 NW: 60.406251388889;5.3186730555556 I can get the other way (approximately at least, php code given) by $w=($nw_lng+$sw_lng)/2; $e=($ne_lng

Refresh / Redraw a Layer in OpenLayers (KML) Network-Link Auto Refresh

£可爱£侵袭症+ 提交于 2019-11-30 07:31:46
TLDR I want to refresh a layer on a timer so it plots the new kml data (like update-link / network link) So far I have tried action function as follows: function RefreshKMLData(layer) { layer.loaded = false; layer.setVisibility(true); layer.redraw({ force: true }); } set interval of the function: window.setInterval(RefreshKMLData, 5000, KMLLAYER); the layer itself: var KMLLAYER = new OpenLayers.Layer.Vector("MYKMLLAYER", { projection: new OpenLayers.Projection("EPSG:4326"), strategies: [new OpenLayers.Strategy.Fixed()], protocol: new OpenLayers.Protocol.HTTP({ url: MYKMLURL, format: new

Toggle KML Layers in Google Maps v3

青春壹個敷衍的年華 提交于 2019-11-30 05:31:43
Is there a simple way to set up checkboxes to toggle (on/off) KML layers for Google Maps v3? I've come across these articles , but none of them have worked for me. Sorry my article didn't work for you, it is a little dated. Here is a full example of a typical Gmaps toggle assuming you are using kml files. <html> <head> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var map; // lets define some vars to make things easier later var kml = { a: { name: "MPLS/STPL", url: "https://maps.google.com/maps/ms?authuser=0

colorise single track in kml file

此生再无相见时 提交于 2019-11-29 20:26:54
问题 I am trying to have a gx:track's line to have different colour in different part in the track depending on some conditions, but I am unable to find way to colour part of a track. I am using C# to generate the kml file. BTW my gx:track's has extendedData. I know I can apply lineStyle to the gx:track but that will only apply to the whole track, but I would like to have different colour along the track's line. Thanks in advance. Terry 回答1: As previous answer says, you have to split track into

Best way to overlay an ESRI shapefile on google maps?

╄→гoц情女王★ 提交于 2019-11-29 18:51:28
What is the best way to overlay a shapefile in Google Maps? After some reading suggests that, converting shapefile into KML and overlaying KML in Google map is an option. If that is the case, how do I convert a shapefile into KMLs? I believe there would be a few open source tools available for this conversion. Can anyone point to a tool to covert a shapefile to KML without any loss of data? Aaron Kreider I like using (open source and gui friendly) Quantum GIS to convert the shapefile to kml. Google Maps API supports only a subset of the KML standard . One limitation is file size. To reduce

KML opens with the wrong geoposition

此生再无相见时 提交于 2019-11-29 17:50:15
I'm trying to create a map of the Stockholm's subway lines in Fusional Tables. In the Fusion Tables I created a map with geo each station: https://www.google.com/fusiontables/DataSource?docid=1K7F2DMY5JBA6ZQOH8a1a4dQjwxoksRDMJ3-wPEg#map:id=3 I want to connect them to the polyline. Options to create polylines and way in the tables there, or they are very well hidden. So I created this KML file and loaded into tables: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>Stockholms T-bana</name> <description>Karta över röda linjen i Stockholms T