kml

How to convert KMZ file to KML using javascript?

≡放荡痞女 提交于 2019-12-04 22:08:42
In am writing JavaScript code for adding kmz,kml and csv file from local folder.All the files will be displayed/added on esri Maps.I am able to add kml and csv, but not kmz.I dont want to include full zip/unzip code or library into my code.I dont need that all.Only need a small code for converting kmz to kml. Also I don't want to store any unzipped or converted file(which will be kml) in any local folder. Just want to read the contents and pass it to my add_kml() function on the fly. Only want to extract the contents from kmz file which will be kml. The code available everywhere is to store

getFeatures() is empty

◇◆丶佛笑我妖孽 提交于 2019-12-04 21:10:39
I have a similar question like POI in OpenLayer 3 but not the same. I'm drawing a map with an KML File: var layerVector = new ol.layer.Vector({ source : new ol.source.KML({ projection : projection, url : _url }), }); It works fine and I can see the points from the KML file in the map. (Using <Style> and <styleUrl> Tags in the KML file.) But if I try to see the features i get an empty Array. console.log( layerVector.getSource().getFeatures() ); ==> Array [ ] any idea? thx mx See the answer in our upcoming FAQ: https://github.com/openlayers/ol3/blob/master/doc/faq.md from the above link: Why

Changing KML Placemark icons on click in Google Maps API V3

巧了我就是萌 提交于 2019-12-04 18:46:03
I am trying to change the KML placemark icons of a KML overlay in a sample Maps application that I am working on. Here's the sample code - function seekml() { var myLatlng = new google.maps.LatLng(40.65, -73.95); var myOptions = { zoom: 14, mapTypeControl: true, center: myLatlng, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.ControlPosition.TOP_RIGHT }, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.SMALL }, mapTypeId: google.maps.MapTypeId.ROADMAP }; url_end = "?nocache=" + (new Date())

Display locations based on KML file in Bing Windows Phone 7

送分小仙女□ 提交于 2019-12-04 18:23:42
Currently i am using the following code to display locations on a map in my application: //Bustop 8448 – Pushpin BusStop8448 = new Pushpin(); BusStop8448.Background = new SolidColorBrush(Colors.Red); BusStop8448.Location = new GeoCoordinate(-36.934608, 174.73016); BusStop8448.Content = "Bus Stop: 8448 "; BusStop8448.MouseLeftButtonUp += new MouseButtonEventHandler(BusStop8448_MouseLeftButtonUp); var BusStop8448Press = sender as Pushpin; this.Map.Children.Add(BusStop8448); This is very tedious as there are hundreds of locations to add, so I was thinking about displaying locations based on a KML

Unable to create KMZ file using java.util.zip

泄露秘密 提交于 2019-12-04 17:47:49
So, I have made some sample KML/KMZ files in the past, largely by hand, and have discovered a few inconsistencies with Google Earth as a result of this work. For the most part, I thought I had a good handle on what I needed to do for specific versions of GE. Recently, I attempted to add some automation to my KML/KMZ sample files to customize them for certain clients based on a given CSV of points and other metadata. I want to reach out to those with experience creating KMZ files from Java with custom icons or content. Here's the wrinkle I'm stuck on: I created, by hand, a bunch of styles and

ASP.NET VB KML Generator

和自甴很熟 提交于 2019-12-04 16:49:15
Here is a handler (ashx) file that generates KMZ files (can generate KML by not using the Ionic compression classes (Ionic = DotNetZip at Codeplex). This handler uses an SQL table to populate the place marks but is a good example of ashx handler use, custom icon use, properly compressing the file, and populating place marks. By using context.Response.OutputStream, this is very efficient within the .NET engine. <%@ WebHandler Language="VB" Class="YourKML" %> Imports System Imports System.Web Imports System.Web.Configuration Imports System.Xml Imports System.Data Imports System.Data.SqlClient

Generate KML file within iphone app

主宰稳场 提交于 2019-12-04 14:17:08
问题 In my app i have to draw route between user location and destination location in MKMapView with help of MKAnnotation and MKOverlay classes. I had gone through the KMLViewer sample code from apple in there they mentioned to create KML file outside the programming steps, but i need KML file generation inside iPhone app programming. is it possible? and i need help on doing that.. Steps to get KML file manually The process to obtain a KML is as follows: Go to: "http://maps.google.com/" Click "Get

Dynamically change colour of KML polygon in Google Maps API v3

泪湿孤枕 提交于 2019-12-04 10:38:43
I'm using Google Maps v3 API to load a KML layer and want to be able to change the colour of the KML from its default blue without having to edit the KML file itself. Is this possible using JavaScript or some other means? Thanks, Neil From my understanding of the documentation, 'no', but it's not especially clear. I'm trying to do a similar thing (but update the colour of mouseover/mouseout). The KML file is loaded by the Google servers, parsed and sent along to your javascript object to be applied to the map, so, by the time your javascript KMLLayer sees it, it's all sorted out. You may be

Which Java libraries can be used to generate KML? [closed]

爷,独闯天下 提交于 2019-12-04 10:08:21
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I am looking for Java libraries to produce data in KML format. 回答1: It appears there are at least three Java libraries for Keyhole

How to parse KML files using perl?

ぃ、小莉子 提交于 2019-12-04 09:15:34
I am trying to parse a KML file using perl. I am trying to use XML::Simple module for doing this. I want to go through each placemarker and extract some data namely 1) Mcode 2) coordinates After reading several posts, I tried the following just to print the coordinates of all the points, but it fails use strict; use warnings; use XML::Simple; use Data::Dumper; my $myFile = XMLin('ExperimentMap.kml'); foreach my $folder (@{$myFile->{Document}->{Folder}->{Placemark}}) { print $folder->{Point}->{coordinates}."\n"; } I am using the following KML: <?xml version='1.0' encoding='UTF-8'?> <kml xmlns=