kml

KML overriding default view after loading

这一生的挚爱 提交于 2019-12-12 02:54:13
问题 I am using geoxml3 from local machine to load kml. However the default view center is changing once kml is loaded. I did try adding line "preserveViewport: true" but still I get full view of kml after loading. any suggestion to stop this. Here is my code <html> <head> <title>Google Map</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map { margin: 0; padding: 0; height: 100%; } </style> <script src="http://code.jquery.com

Changing KML Files Contents

倖福魔咒の 提交于 2019-12-12 02:33:27
问题 I am just wondering if there is a possibility that my program can add/remove markers in the kml file that I just created? For example, my KML file contains all the areas in a city where there is a reported case of flooding. After uploading the file and displaying it in the Google Maps through my website, a new case was reported. Is it possible to add that place in my website's "add area" field and update the KML file as well? Thanks in advance! 回答1: There are plenty of libraries out there for

Writing a KML using C# - ScreenOverlay

*爱你&永不变心* 提交于 2019-12-12 02:25:52
问题 I am trying to get an overlay on google maps using a program I am making in C#. I can't seem to figure out the code to get the position of the overlay where I want it. It just sits right in the middle of the page no matter what I try. Here is my code: kml.WriteStartElement("ScreenOverlay"); kml.WriteElementString("name", "elephant"); kml.WriteStartElement("Icon"); kml.WriteElementString("href", "images/elephant.jpg"); //This is the part I can't figure out below kml.WriteStartElement(

Hex to BGR Hex conversion for KML color in Java

若如初见. 提交于 2019-12-12 02:17:52
问题 I'm building a utility that takes placemarks on a web based map and exports them to KML for use in Google Earth. The problem is the hex values I'm given are standard RGB, whereas KML needs BGR (AABBGGRR where AA is the alpha, but that's not relevant here). For simple colors like red (FF0000), the conversion is simple: 0000FF. However, I've found for something like 7DCCFF (which is like a light blue), simply reversing the string doesn't yield the same color in Google Earth. Am I missing

Google My Maps: How can I export coordinates from a network-linked KML file?

不想你离开。 提交于 2019-12-11 21:02:38
问题 I've been checking out the documentation for Google's "My Maps" service, and I can't figure out if it will let me do what I need to do. Our client has a map, created using My Maps, that defines several delivery areas using colored polygons. I understand that it's possible to export a KML file containing the coordinates for these polygons, and that it's also possible to create a network link so said KML file will be updated whenever the map is. My problem: I don't know what to actually do with

issues with KML link to Google Maps API

谁说我不能喝 提交于 2019-12-11 17:41:17
问题 I'm trying to resolve an issue with uploading a live kml file to the google maps api. I have a live website that I uploaded the kml file to, but when I use the url within the call function it doesn't show up in the google maps api. It's a public kml file....the website that I'm trying to use the google maps api is not live, just run off my desktop at the moment. any thoughts on what I'm doing wrong? The website kml link is: http://www.gsphotoalchemy.com/170113.kml var ctaLayer = new google

KML/OpenLayers GroundOverlay element that doesn't have <Document> tags not loading onto map?

泄露秘密 提交于 2019-12-11 15:43:03
问题 I have a KML element with no document tags and just tags like...(with some irrelevant elements removed with ...) <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <GroundOverlay> <name>...</name> <description>...</description> <Icon><href>...</href></Icon> <LatLonBox> ... </LatLonBox> </GroundOverlay> </kml> In OpenLayers, I can't get this to load without document tags around the GroundOverlay. I can however get a place mark that is the root node with no

Google Maps API v3 takes too long to show changes in the GeoRSS feed

荒凉一梦 提交于 2019-12-11 13:31:35
问题 I need to display a GeoRSS feed on Google Maps API v3. This feed is created through the following procedures: The user types in a keyword Thanks to a PHP code, an RSS file is created by taking news items containing the keyword from 3 different existing RSS feeds. The link of this RSS file is given to the Metacarta RSS Geotagger service ( http://labs.metacarta.com/rss-geotagger/ ) The obtained GeoRSS file must be also converted into a KML file (if I give the link to the GeoRSS as an argument

Export coordinates from KML

◇◆丶佛笑我妖孽 提交于 2019-12-11 10:57:52
问题 I need export line coordinates from KML. I use some KML2CSV export tools. but this programs cant read my kml. Error: Read Error. WHY i need coordinates: I`v kml which there pipelines of regions. i must show this coordinates on google map without KML.. I hope that I can explain to yours. 回答1: One solution: Google Fusion Tables One way to extract coordinates from your KML is to upload your KML to Google's Fusion Tables. If Google Earth parses your data then most likely you'll be able to import

PHP: Converting a KML into a KMZ

微笑、不失礼 提交于 2019-12-11 10:30:08
问题 I've got a custom php script that creates a KML file. Now how do I convert it into KMZ? Should I just run gzcompress() on it? Or should I create a ZipArchive? 回答1: Creating a ZipArchive worked. I add the already created kml file to it. $zip = new ZipArchive(); $zip_name = "c:\\kml\\".$sFilename.".kmz"; $filename = "c:\\kml\\".$sFilename.".kml"; $zip->open($zip_name, ZIPARCHIVE::CREATE); $zip->addFile($filename); $zip->close(); 来源: https://stackoverflow.com/questions/21149383/php-converting-a