kmz

How to toggle between KML/KMZ layers in Google Maps api v3

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 00:51:57
I'm developing a web page with a Google maps application. Currently, I have a functional search bar and map that displays three KML/KMZ layers. I need to be able to toggle between each of the layers, either display one of them, two of them or all three. There is a similar function in Google Earth, but I need it in Google Maps. How can I do this? Here is my code for the map and search bar: <script type="text/javascript"> var geocoder; var map; var marker; function initialize() { geocoder = new google.maps.Geocoder (); var latlng = new google.maps.LatLng (40.43, -74.00); var myOptions = { zoom:

Using KMZ Files in Google Maps

天大地大妈咪最大 提交于 2019-12-02 23:31:28
Is there any way I can use a KMZ file in Google Maps? My KML file is around 10.7MB so it doesn't load on Google Maps. KMZ file is around 2MB. The only way I see it is to have multiple KML but it's too much work. I might end up doing that, but was just wondering if KMZ can be used? Thanks. Yes, you can specify a KMZ file using the Maps API: var kmzLayer = new google.maps.KmlLayer('http://www.kmzlinks.com/redirect.asp?id=110&file=PalmIsland%2Ekmz'); kmzLayer.setMap(map); In your specific case, your script should look like this: <script type="text/javascript"> function initialize() { var

Unable to load a local KMZ file into a browser with the google earth plugin using fetchkml function

梦想与她 提交于 2019-12-01 06:15:48
问题 We have a KMZ file that loads into the Google Earth Desktop application just fine. No errors. When we try to use the Google Earth Plugin to do the same thing, it does not even return from the fetchKml function. Any special settings we need to know about to use fetchKml on a local file? I am trying to load the file like so: // Where 'ge' is the Google Earth Plugin var href = 'C:/KMLDATA/TEST.KMZ'; google.earth.fetchKml(ge, href, function(kml) { /* do something with kml */ }); 回答1: This has

Java API for KML (JAK) embedding images in kmz files

三世轮回 提交于 2019-11-29 07:56:29
Is there a way to just add an image file into a kmz file using Java API for KML (JAK)? I can create a kml file with no problem, but I'm trying to just embed a resources (such as an images folder with some image files), but the marshalAsKmz method takes only Kml objects as additional files, so I can't figure out how to just include extra images. I've been using JAK for over a year on a project. I use it to create the KML, then I marshal it as just plain KML (not KMZ). I created a separate utility class that uses the Java SE 'Zip' classes to manually create the KMZ. It works just fine. A KMZ is

Nesting KMZ files

谁都会走 提交于 2019-11-28 14:04:47
Is it possible to create one KMZ file that is composed of several smaller KMZ files? I would prefer to not have to manually merge the actual KML entities, but I will if that's the only option. A KMZ file can have any number of inner KML files (NOT KMZ files). But the first entry in the KMZ file must be the root KML file (typically named doc.kml ), which may include network links with references to other KML or KMZ files. Several inner KML files, for example, could reference a shared style (in another KML file) via relative URLs. The inner KML files can nest to any level of depth to other KML

Java API for KML (JAK) embedding images in kmz files

十年热恋 提交于 2019-11-28 01:25:56
问题 Is there a way to just add an image file into a kmz file using Java API for KML (JAK)? I can create a kml file with no problem, but I'm trying to just embed a resources (such as an images folder with some image files), but the marshalAsKmz method takes only Kml objects as additional files, so I can't figure out how to just include extra images. 回答1: I've been using JAK for over a year on a project. I use it to create the KML, then I marshal it as just plain KML (not KMZ). I created a separate

Loading a local .kml file using google maps?

谁说我不能喝 提交于 2019-11-27 17:26:33
I created a hello world program to load a local kml file (borrowed from google's docs): var ctaLayer = new google.maps.KmlLayer("http://localhost:8080/kml/cta.kml"); This does not work (nothing gets loaded). However, when I change that line to: var ctaLayer = new google.maps.KmlLayer("http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml"); it loads properly. Both kml files are identical. What do I need to do to get it to load when serving it myself? (I tried both absolute and relative paths, and I know the paths I am using are correct...) Also I added the correct mime type to my