Overlays (screen overlay, ground overlay, etc.) and icon images via Style references in KML are referenced only as URLs either absolute or relative not as inline base64-encoded content which is allowed in other XML standards. Icon Style example with absolute URL: <Style> <IconStyle> <Icon> <href>http://maps.google.com/mapfiles/kml/pal3/icon21.png</href> </Icon> </IconStyle> </Style> Ground Overlay...
android,gps,geolocation,kml,kmz
I think the problem comes of small inaccuracy in the GPS logs. As you take points that are very close from each other (30 - 60 meters) a small variation can nearly double the speed. I believe you could clean your data this way: public double calculateSpeed(Location prev, Location curr,...
java,google-maps,gwt,google-maps-api-3,kml
For anybody stumbling upon this question, what I eventually ended up doing was using Google's chart API: https://developers.google.com/chart/image/docs/gallery/dynamic_icons This allows you to dynamically create images using arguments passed into a URL. Then you can just use that URL to create a MarkerImage or GroundOverlay: MarkerImage mi = MarkerImage.create("http://chart.apis.google.com/chart?chst=d_text_outline&chld=000000|16|h|FFFFFF|_|Example"); MarkerOptions mo...
You need to use the version 3.5.0 instead of 3.4.0 to have the new vector api see release notes
google-maps,google-maps-api-3,kml
For #1 you can add an InfoBox with rotated text along the polyline. For #2, there is no option to modify how the ends of polylines are rendered, you could try putting a square symbol over the end, but it would be a hack. var labelText = "4.32"; var labelDiv...
Looks like you are closing the SQL connection after 'Add' and hence getting no result for your select query. } else { echo "Added"; } mysql_close($con); $sql2="SELECT * FROM userActivityLocation"; $result2=mysql_query($sql2); Move mysql_close($con); down to the very bottom of your file and you should be good....
You have to remove either the call to init() in your onload handler or the call to google.setOnLoadCallback(init), otherwise a map will be added every time you call the init function.
finally little trick I found do the result $file = 'file.kml'; $xml_file = file_get_contents($file); $xml = simplexml_load_string($xml_file); $decodearray = json_decode(json_encode((array)$xml),1); $nowdatetime = date_create(); $tstamp = date_timestamp_get($nowdatetime); switch (!isset($decodearray['Document']['Folder'][0])) { case true: $docfolder = $decodearray['Document']['Folder']; break; case false: $docfolder = $decodearray['Document']['Folder'][0]; break; } echo count($docfolder['Folder']); simple switch case to indexing array...
I have finally figured out solution for same. You need to overwrite createPolygon attribute of your parser for same. var districtInfoMap = {doc_url1:infowindow_content1, doc_url2:infowindow_content2 }; var parser = new geoXML3.parser({ createPolygon: mapDrawingToType(), map: map, processStyles: true, zoom: false, singleInfoWindow: true, }); mapDrawingToType = function() { return function(placemark, doc) { var...
The <href> element in KML takes a URL not a Windows file path. The URL can be an absolute or relative location. To get it working suggest you first move the KML file and the image to the same folder then refer to the image by its filename. <Style id="icon">...
As geocodezip mentioned, the correct order has to be lng and lat.
ios,objective-c,xml,parsing,kml
Ok found the issue. It was to do with how I was accessing the file once downloaded. Once saved to disk I would send it's URL to the parser. The problem was I was using the incorrect NSURL method, I was originally using: NSURL *fileUrl = [NSURL URLWithString:[self pathForFile:self.pathToKmlFileOnDisk]]; Whereas...
Why polygons and not a raster KML? library(raster) tmin <- getData("worldclim", var = "tmin", res = 10) tmin1 <- tmin[[1]] newext <- c(-1, 1, 40, 43.5) tmin1.c <- crop(tmin1, newext) KML(tmin.c, 'test.kml') If you need polygons: p <- rasterToPolygons(tmin.c) and now you can use KML (or kml) again Now to...
Both the Document and Folder elements in KML are container types and it is perfectly valid to have a Document inside a Document, Document inside a Folder, Folder inside a Document, etc. In nearly all cases the Folder and Document can be used interchangeably. Conceptually it makes sense for "Folders"...
postgresql,kml,postgis,rails-geocoder,rgeo
I finally did it geometry = GeoRuby::SimpleFeatures::MultiPolygon.new doc = kml =~ /\<kml / ? Nokogiri::XML(kml) : Nokogiri::XML.fragment(kml) doc.search('Polygon').each_with_index do |hpoly,i| poly = GeoRuby::SimpleFeatures::Geometry.from_kml(hpoly.to_s) end geometry.empty? ? nil : geometry The kml file is directly the uploaded file where I applied the open method. I've found a lot of inspiration coming...
After checking the map everyday for a week, it started working with the right icon after 9+ days. Im not sure what changed, but it seems like leaving it for a considerable length of time will fix the problem.
You can't. At least, not while using the native google maps KML Overlay. The two workarounds I can think of are: 1.- Use jQuery or CSS to hide the KML_2 attribute. This is tricky because inspecting elements inside the google maps sandbox needs a lot of trial and error, plus...
Since your XML document leverages a default namespace you should use the package level @XmlSchema annotation to map the namespace qualification. The @XmlSchema annotations is added to a special class called package-info that goes in the same package as the domain model and contains the following content. With @XmlSchema specified...
javascript,google-maps,kml,geoxml3
Use function closure to associate the placemark with the event listener. One way (you can also use an anonymous function): kml = new geoXML3.parser({ suppressInfoWindows: true, map: map, afterParse: function (doc) { for (var i = 0; i < doc[0].placemarks.length; i++) { var p = doc[0].placemarks[i]; clickablePolygon(p); } } });...
if you remain the track name empty this constant part will vanish, the default name is something like this in track block: <name>2009-08-13T17:35:24Z</name> you can remain this empty, simply like this: <name></name> with no harm. ;)...
I'm not sure I understand your question, but I'll try to answer: Should the function "addFeatureStyle" return element, or a string, or something else? You're calling the method appendChild() with the value returned by addFeatureStyle("red", "501400FA") as argument. The documentation of appendChild() shows that it takes a Node as argument....
If I have understood you correctly, you are trying to fetch the name & description present inside the PlaceMark node. But, since you are only fetching Root.Elements() your query will only fetch the complete XML starting from your root node. You need to find the Descendants of PlaceMark node because...
google-maps,google-maps-api-3,kml,geojson
IconStyle/color and scale are not supported by google maps: https://developers.google.com/kml/documentation/kmlelementsinmaps Using external styles minimizes the size of these frequently changing feeds. USGS offers GeoJSON(P) feeds for embedding in javascript maps, as described on this page: https://developers.google.com/maps/tutorials/data/importing_data#requesting_jsonp USGS GeoJSON feeds are available at: http://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php They can converted to GeoJSONP by appending...
You could consider the following approach: 1)suppress a default info window: var kmlOptions = { suppressInfoWindows: true, // do not to display an info window when clicked preserveViewport: false, map: map }; var layer = new google.maps.KmlLayer(url, kmlOptions); 2)register a shared instance of Info Window: var infoWindow = new google.maps.InfoWindow();...
date,time,slider,kml,google-earth
In your master KML file, you need to add <gx:TimeSpan> to a View or Camera element in the top-level container. The gx:TimeSpan controls the visibility of time-stamped Features in a user-defined view. To display everything between 10/09/2015 and 12/04/2015 by default, the structure of KML should look like this. <kml...
javascript,google-maps,google-maps-api-3,kml
Your map variable is local to the initialize function. working fiddle Remove "var" from in front of it inside the initialize function: function initialize() { var mapOptions = { center: new google.maps.LatLng( 38.04798015658998, -84.59683381523666), zoom: 16, disableDefaultUI: true, zoomControl: true, mapTypeId: google.maps.MapTypeId.SATELLITE }; var kmlOptions = { suppressInfoWindows: true, preserveViewport:...
kml,google-fusion-tables,location-history
The supported geometry-types when you import KML are Linestring, Polygon and Point (see: https://support.google.com/fusiontables/answer/174680 ) This would work: <Placemark> <name>Latitude User</name> <description>Location history for Latitude User from 09/21/2014 to 09/28/2014</description> <Point> <coordinates>99.99999,41.99999,0</coordinates> </Point> </Placemark> ...
javascript,google-maps,kml,google-fusion-tables
For FusionTables click events, the .infoWindowHtml is a property of the event. For KmlLayer, the .infoWindowHtml is in the .featureData property of the event. So for KmlLayer click events, you need to use: e.featureData.infoWindowHtml For FusionTables click events, you need to use: e.infoWindowHtml Change suppressInfoWindows:true for all the layers. Change...
javascript,google-maps,google-maps-api-3,kml
Seems like a bug in the KML renderer. As a workaround, you could use a third party KML parser (like geoxml3 or geoxml-v3), geoxml3 doesn't seem to have that artifact: Example using geoxml3 (and a slightly modified KML to cover the whole world) Note that for complex KML the tiled...
Set the map-property of a selected layer only when it's not set yet: function check() { if(document.getElementById('watersheds').checked) {if(!watershedLayer.getMap())watershedLayer.setMap(map);} else {watershedLayer.setMap(null);} if(document.getElementById('ere1949').checked) {if(!ere1949Layer.getMap())ere1949Layer.setMap(map);} else {ere1949Layer.setMap(null);} } http://jsfiddle.net/jhagmq7L/16/...
Make these changes: Use KmlLayer instead of KMLLayer. KMLLayer supports only KML URLs on the public Internet, and it is deprecated. It will not work for a local KML file. KmlLayer supports both local KML files and KML URLs. Be sure you've given your app permission to access local files:...
In KML you can create a Screen Overlay that is always visible and can be placed at any location of the screen. A collection of samples is included in the Screen Overlays folder in the KML Samples file. As an example, enable the "Absolute Positioning: Top left" folder in the...
It's because in my KML i was displaying the points lat/long and they should be long/lat
google-maps,firefox,google-maps-api-3,kml
UPDATE 7/23/15 1:49PM MDT This is a known bug between Firefox and Google Maps, the current workaround is to load the Google Maps js file with "v=3" on it, so load the source using: src="http://maps.google.com/maps/api/js?v=3&sensor=false" or src="http://maps.google.com/maps/api/js?v=3" I have tested this in Firefox 39.0 and this workaround stops the issue...
Dropbox and Google Drive, for example, hide the actual URL so you have to find the "share" options or download options which will help you find the URL to the actual KML content. Clicking on the file often displays a preview HTML page with information about the file not the...
There is a bug in Google Earth with respect to having a KMZ with NetworkLinks whose target has referenced files being saved in the saved places file. When saved the base file path in your KMZ file is changed from the KMZ location to the location of the saved places...
xml,vba,access-vba,kml,folders
First, KML is a special XML file. And Access can export table and query data into XML format. So you can easily export your coordinates data into XML without iterating through a recordset: Application.ExportXML acExportQuery, "yourtableorqueryname", "\path\to\file.xml" However, KML requires special headers which need to be incorporated with your coordinates...
javascript,google-maps-api-3,kml,google-fusion-tables
Your code as posted works for me. The two issues are: the 1 meter circle only selects one county (I assume you mean counties not countries). the fill is fairly transparent and the orange lines can't be seen. note that there isn't any real way to query for adjoining/bordering polygons....
No (at least not with KmlLayer), KML URLs must be publicly available. localhost is not publicly available. from the documentation displayed on a map using a KmlLayer object, whose constructor takes the URL of a **publicly accessible KML** or GeoRSS file. You can use a third party parser like geoxml3...
ios,xcode,annotations,mapkit,kml
The answer provided by Anna above solved the problem See stackoverflow.com/questions/9814988/…. Code is creating an MKPinAnnotationView instead of plain MKAnnotationView. ...
google-maps,google-maps-api-3,kml,qgis
I would say that the Google Maps KML rendering engine has some issues. It works when I use the geoxml3 third party parser to render it, but not when I use the Google Maps Javascript API v3 KmlLayer to render it. rendered with geoxml3 Note that the performance with third...
It seems like you have a few options here to share a state: Use a db. file system based persistence a separate daemon process that you can connect to via sockets Use memcache or some other service to store in memory You can share states via python: https://docs.python.org/2/library/multiprocessing.html#sharing-state-between-processes) You can...
set the zoom-option of the parser-options to false var geoXml = new geoXML3.parser({ map: map, singleInfoWindow: false, afterParse: useTheData, suppressInfoWindows : true, zoom : false }); https://code.google.com/p/geoxml3/wiki/ParserReference#geoXML3.parser_Options...
You should take a look at the documentation of UIDocumentInteractionController by Apple. I've tried it now and the Open in GoogleEarth option appears when you use that controller. For example to present it from a button (called button) for a path called url in a view controller: UIDocumentInteractionController *interactionController =...
.net,xml,vb.net,kml,google-earth
As far as I can tell, you have the following subproblems: Parse the XML and extract the name and the coordinates. Split the coordinates into some data structure. For step 1, VB's LINQ to XML is the easiest way. The following working code example should help you get started: Imports...
javascript,google-maps,google-maps-api-3,kml
Change your KML initialization code from: var kmlLayer = new google.maps.KmlLayer(url, { suppressInfoWindows: true, preserveViewport: false, map: map }); to var ctaLayer = new google.maps.KmlLayer( { url: url, suppressInfoWindows: true, map:map, zindex: 0, clickable : false }); Here is a fiddle: http://jsfiddle.net/loanburger/jnrnmog4/ You can click the map and the marker...
javascript,google-maps,google-maps-api-3,kml
Found the solution myself. Since Google is serving KML data only zipped (KMZ), there doesn’t seem to be any way anymore to get the actual raw layer data to dynamically build a map from scratch while being able to access and manipulate each marker etc. At least it is possible...
javascript,google-maps,google-maps-api-3,kml,parcel
geoxml3 parses the KML to native google.maps.Polygon objects. You can process those polygons in the afterParse function: var myParser = new geoXML3.parser({ map: map, afterParse: useTheData }); var kml = myParser.parse('kml/SO_20150619a.kml'); function useTheData(doc) { for (var i=0; i < doc[0].gpolygons.length; i++) { var centroid = new google.maps.Marker({map:map,position: get_polygon_centroid(doc[0].gpolygons[i].getPath().getArray())}); } }...
Some KML elements are not supported in Google Maps. For example, the <refreshVisibility> element is not supported. List of limitations of KML in Maps can be found here: https://developers.google.com/kml/documentation/kmlelementsinmaps There are also some validation errors in your KML. The spelling and order of elements in KML is strict. The visiblity...
There are a few undocumented differences when you load KML directly as opposed to via a NetworkLink. When you load the KML via the NetworLink it looks for a LookAt or Camera in the outermost element which is the Document in test.kml file. You can either 1) copy/move the <LookAt>...
xml,google-maps,google-maps-api-3,kml,google-earth
Your original KML coordinates have spaces in the tuples, that is not valid (spaces separate tuples). <coordinates>149.02126, -36.489864, 100 149.3816, -36.31477, 100 149.25783, -36.134285, 100 148.9647, -36.4074, 100 149.02126, -36.489864, 100</coordinates> should be: <coordinates>149.02126,-36.489864,100 149.3816,-36.31477,100 149.25783,-36.134285,100 148.9647,-36.4074,100 149.02126,-36.489864,100</coordinates> ...
Ended up finding out how to use folder public void map() throws IOException{ for(int i=0; i<getVessels().size(); i++){ if(!getVessels().get(i).getCoordinates().isEmpty()){ FileWriter fstream = new FileWriter("C:\\Users\\Documents\\maps\\" + getVessels().get(i).getMMSI()+ ".kml"); BufferedWriter out = new BufferedWriter(fstream); out.write("<kml>"); out.write("<Folder>"); out.write("<Placemark>"); out.write("<name>"+getVessels().get(i).getMMSI()+"</name>"); out.write("<LineString>");...
Your questions is a little vague in terms of what you're trying to do. You say you want to parse the <Placemark> node but there may be additional <Placemark> nodes among the "junk" in the file. It's unclear whether you want all the <Placemark> nodes or a specific one. So,...
Select all href found in InconStyle If href|text() = "y" then replace with "x" That's not exactly what your example shows us. It does "If href|text() contains "y"..." Anyway, try it this way: XSLT 1.0 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <!-- identity transform -->...
r,networking,kml,leaflet,shiny
There are a few issues here. rCharts overrides rMaps when they are both loaded up. So the Leaflet$new call is actually coming from the rCharts package. Also it is not possible to use the addAssets method that was utilised previously. It is necessary to change the libraries/leaflet/config.yml file and add...
javascript,google-maps-api-3,kml
There is a bug in the Google KML renderer. Issue 8015...
php,codeigniter,coordinates,kml,geojson
The point is inside the green boundaries, but you just want to override that with another polygon. Assuming that you have multiple polygons, it might be worth keeping track of whether the polygons are shaded (True) or not shaded (False), or some other combination based on what your algorithm actually...
The problem is the spaces in the path. You can add quotes to the parameter and it should work: gf = """C:\Program Files (x86)\Google\Google Earth\client\abc.kml""" ...
android,google-maps,kml,google-earth,gpx
I suggest using http://gpx2kml.com/ if you want to convert the kml file to gpx. It's a free online converter and it works both ways.
I think that you can do it like it was a Xml file, but see if this or this helps you.
This is a known undocumented feature in Google Earth. The Google Maps icons with URL http://maps.google.com/mapfiles/kml/pal*/icon**.png are automatically redirected to one of the standard Google Earth icons. This is documented here (note 2). So from your example, the icon: is redirected to with red fill color. Source URL: http://maps.google.com/mapfiles/kml/pal4/icon18.png And...