kml

Google Maps: Some KMZ layers disappear after many access

試著忘記壹切 提交于 2019-12-14 04:23:39
问题 Recently I'm developping a Map containing KML Layer compressed as KMZ file (about 45mb). As there is a file weight limitation, I first split the files into 3mb files. Then I noticed that some splitted files was not showing everytime, causing some "blanks" on the map. So I made researches on many forums, and found that the real limitation of files in order to get everything working properly is 2mb. After update, the KML Layer was indeed showing entierely. However, after doing many tests, I

Center google map on kml, not location

烂漫一生 提交于 2019-12-14 03:34:34
问题 I have this simple script on a web page, loading a small kml file, but when I add geolocation, it always centers the map on the current location. And I want to load the map centered on the kml file. User location should only be displayed if he is in the area of the kml, or if he drags the map to the area where he is located. Accessorily, is there a way to easily refresh the user location on the map with javascript (maps api 3), without re-centering the map ? var map; function initialize() {

Split KML into subfiles with XSLT, nearly there but can't get it to work

不想你离开。 提交于 2019-12-14 02:19:13
问题 I have a KML file with country borders <Document> ... <Folder> <name>Countries</name> <Style> <ListStyle> <listItemType>checkHideChildren</listItemType> <bgColor>00ffffff</bgColor> <maxSnippetLines>2</maxSnippetLines> </ListStyle> </Style> <Folder> <name>Labels</name> <Placemark> <name>Angola</name> <styleUrl>#NoneIconStyle</styleUrl> <Point> <coordinates>17.5379654426636,-12.2994772211426,0</coordinates> </Point> </Placemark> ... ignore these <Folder> <name>A -</name> <Placemark> <name

geoXML3 add custom icon for marker

随声附和 提交于 2019-12-13 20:13:37
问题 I am trying to add a custom icon for the marker after parsing a kml file with geoXML3, but I cannot figure out how. I cannot add specifications in the kml files, so I am trying to do it with Javascript. I didn't manage to find any useful documentation about it. This is my kml loading: myparser.parse('http://mywebsite.com/myparser/last_feed/now.kml'); var myparser= new geoXML3.parser({map: map,zoom:7,icon: image}); 回答1: To change all the marker icons using geoxml3, set the markerOptions.icon

limit in the geolocation of multiple points in google fusion tables

混江龙づ霸主 提交于 2019-12-13 09:27:17
问题 I'm trying to geolocate these 27 points at the same time, in the same row. But the process returns only the first 10 points, even if in the preview they are all 27 correctly geolocated. Why? Is there a particular limit to the number of points I can locate? <Point><coordinates>7.680237,45.064504,0.0</coordinates></Point> <Point><coordinates>7.681675,45.061957,0.0</coordinates></Point> <Point><coordinates>7.685044,45.060768,0.0</coordinates></Point> <Point><coordinates>7.686482,45.06029,0.0<

label a kml file in Google Maps API v3

六眼飞鱼酱① 提交于 2019-12-13 07:37:54
问题 I am trying to figure out how to use Google Maps API v3 to label a kml polyline that was originally created in ArcGIS Desktop. Unfortunately, the examples that I came across thus far either don't seem to apply to kml files, had dead links, or were examples on how to create pop-ups. If anyone has an example of how to create labels (not popups) from a kml file let me know. Side questions: *In ArcGIS I can use Layer->Properties->HTML Popup to configure the popup for kml. What do I need to do in

Styling Google Earth Plugin borders layer

有些话、适合烂在心里 提交于 2019-12-13 05:11:09
问题 I have my map, in 3d and I want to style it so that only counties with markers have a certain color. I also want to change the boundary color. I am using v3 of the Google Maps Api to load the earth. Is there a way to customize the map (3d) and also change the color of the borders in the in-built layer. Example 3d map 回答1: The borders layer you refer to is simply on or off, there are no methods to style it or alter its behaviour. If you wish to have a custom data layer to show borders then you

Can't get KML files to load on start or location search to work in custom map

心已入冬 提交于 2019-12-13 04:35:51
问题 I'm not a javascript guru, so this project I"m working on has been pretty challenging. I've managed to gather up various bits of code to create my map, and I'm almost there, but am stuck on the homestretch. I'm trying to get the KML files I'm referencing to load up as soon as the page is opened. I've tried setting the checkboxes to "checked", but that doens't work either. To get the KML to load, I have to uncheck and the re-check the box. It's probably something simple, but I've tried

Add and Remove KML overlay to a Google Map from external link

独自空忆成欢 提交于 2019-12-13 04:22:57
问题 I'm trying to emulate this functionality https://maps.google.com/maps?q=http://en.wikipedia.org/w/index.php%3Ftitle%3DTemplate:Attached_KML/N_postcode_area%26action%3Draw I want to be able to add and remove a postcode region from an external link / checkbox. I have the KML file loading correctly using this code but I have no idea how to attach the external event listener / handler. function initialize() { var london = new google.maps.LatLng(51.522416,-0.11673); var mapOptions = { zoom: 11,

Trying to convert kml to geojson and getting ArrayIndexOutOfBoundsException with geotools

回眸只為那壹抹淺笑 提交于 2019-12-13 04:16:54
问题 I am trying to convert a kml to geojson with geotools 20.5 and i am getting ArrayIndexOutOfBoundsException. The file i am trying to convert can be converted on other frameworks correctly but on geotools i had this error. I am using geotools 20.5 and java 8. Can someone help me? My code: try { reader = new FileInputStream("file.kml"); PullParser parser = new PullParser(new KMLConfiguration(), reader, SimpleFeature.class); FeatureJSON fjson = new FeatureJSON(); FileWriter tmp = new FileWriter(