I've searched the various forums and can't find this question asked. If it has, please point me to it.
I'm generating a .KML file with lots of point data in a 400 mile area. When the file is opened, points labels are shown which makes it very busy.
What I'd like is for the file to open with only the points and no labels. Then when the users zooms in to let's say 20 miles, the labels are shown.
I have control over the generation of the KML file, so I can add any additional "parameters" that I need to accomplish this effect.
I'd appreciate someone pointing me to the best method to do this.
Thanks,
MEG
Add each of your points twice to your KML file and place them in different Regions. In the outer region, you can hide the labels via this technique.
Related
I'm trying to display KML polygons of all Canadian provinces and territories on Google Fusion Tables for use in an interactive map I'm making. However, when I upload the KML file containing the polygons, Nunavut appears as incomplete (missing pieces of the polygon on many islands, large gap on mainland border with Northwest Territories). As far as I can tell this is not the case with any of the other 13 regions. It is especially strange because when I open the same KML file in QGIS, all regions appear as complete.
You can view the map here: https://www.google.com/fusiontables/data?docid=1KaUE7sZWdA2PtsOV2tYHQ_qCaQA0kTGuERwfZTd_#map:id=3.
At first I thought that since Nunavut is in the bottom row of my table, the table may have just reached a limit and Fusion Tables just stopped loading it there. So, I went back to QGIS, isolated Nunavut, and simplified the geometries (which, as I understand, cuts down the number of lat/long points contained in the file). Then I uploaded that Nunavut file to my fusion tables and found that the same problem occurred. You can view that map here: https://www.google.com/fusiontables/DataSource?docid=1s-aHA-rOeW8TfsOI4Ef-3rFJ0fnn_SjjIG-CDed8#map:id=3.
Even weirder, when I use other files from StatCan (all the shp files I've downloaded/converted into KML have been from here the Canadian government's statcan website), such as Census Divisions or Census Subdivisions, Nunavut always appears incomplete (and is the only province to do so).
I've tried making the conversions both in QGIS and using ogr2ogr to no avail. The Nunavut polygon always looks the same.
Any help is appreciated. Thanks in advance!
-A
I have 3 KML's that do not draw at all and 2-3 that act sporadically depending on what zoom level they are at. I checked the file limitations and I don't seem to be violating any of the limits. I went back to my original shapefiles to check for geometry errors. One of the files had geometry errors and I fixed them yet it didn't seem to fix the problem of the KML not rendering. I've also implemented zoom functionality with Googles Visualization API and geoxml3 processor. Here are some interesting things that happen with my application:
One of the KML files that does not draw will actually respond to the
zoom functionality by zooming to its extent but still won't draw the
polygon; evidence that the KML is being parsed but not drawing.
One of the KML files that does not draw will eventually draw if I
click on the polygon next to it and am zoomed in close enough. It
will not initially.
I have two KML files that draw when zoomed out but 'disappear' when
I zoom in.
My application is here and my fusion table is here. If anyone has had similar problems and was able to fix them I would really appreciate to know how it was accomplished because I'm stumped at this point.
Thanks
first of all: Fusion Tables are still experimental
some issues:
South Nelson Elementary is missing in varID
JV Humphries Secondary Polygons needs to be fixed
I thought I would post an update.
It turns out some of my data did have geometry errors; those were fixed and converted to KML.
The problem is my actual coding. The code was orginally written to simply display polygons from an array and to be turned on/off via a checkbox. The reason for this was to be able to view adjacent boundaries of the other polygons. I achieved this in my initial coding and the user had to zoom into the area of interest via Google's map functionality.
Then I was asked to have a zoom function when the checkbox was clicked to have the application zoom to the polygon in question. This of course works but it depends on which order the checkboxes are clicked on. I'm fairly certain it has to do with how the empty array is populated as checkboxes are clicked on/off.
I don't fully understand the logic of how the code decides which polygon to zoom or not zoom to. All I know is that if all checkboxes are unchecked then each checkbox is checked on/off one at a time the zoom functionality works.
If anyone has a suggestion on how to have each checkbox act 'independently' to zoom regardless of order clicked I would appreciate it.
I am working on a GE local bike mapping project, and I am using placemarks to create labels with linked descriptions for the roads/trails on the map. While it is nice for the user to click a placemark/label on the map for a description; as the map has grown, the labels can also create visual clutter. The placemarks for the label/descriptions are currently stored with the lineStrings in folders for each road.
It would be nice to be able to turn all of the labels off or on without opening each of the separate road folders to de/select each one. The names of most of the roads are also available on the underlying Google Earth hybrid layer, so the labels and descriptions are helpful but not absolutely necessary.
Download https://sites.google.com/site/tuobikes/kml/hullcrabtree.kmz for an example.
Is there any way to define a set of placemarks as a subtype in order to turn them all on or off as a group? For example, placemark type=label or placemark type=photo... This seems like useful functionality, but I don't see it in the kml reference
Is storing the placemarks for the labels/descriptions together in a folder separate from the lineStrings for the roads the only way to solve the problem?
I don't know of any way other than a Folder to turn on/off a group of related placemarks.
That said, consider using one or more KML Regions to reduce clutter:
"Regions are a powerful KML feature that allows you to add very large datasets to Google Earth without sacrificing performance. Data is loaded and drawn only when it falls within the user's view and occupies a certain portion of the screen. Using Regions, you can supply separate levels of detail for the data, so that fine details are loaded only when the data fills a portion of the screen that is large enough for the details to be visible."
I have a dataset (i.e. a shapefile) containing spatial location data (coordinates) and elevation data as well as other attribute fields.
I want to select points which have at least 200m vertical separation (i.e. are at least 200m apart on the z-axis) AND are within 3km of each other.
The aim is to create a new shapefile with all points that have this relationship with 1 or more other points.
Im sure there is a solution to this problem (maybe not using arcmap at all?) but i just cant find it. any help would be greatly appreciated.
Chris
You are going to have much better luck asking this question in gis.stackexchange.com. Many more ESRI users/programmers there. As a matter of fact I bet you find your solution there without having to ask the question.
You can run the ArcGIS Near tool on all the points.
Then select by attribute points with Z values of >200m and distance values of <3000m.
I'm trying to generate a KML file to display a set of features scattered around the UK. I would like the features to be grouped together at higher zoom levels, ideally displaying as an icon with a count of the number of features, so that users can see clusters of features easily.
Essentially I'm trying to do something along these lines, but in Google Earth, not Maps.
Can anyone point me in the right direction. I'm a bit of a newbie with KML :-)
Cheers,
RB.
ANSWERS :
My own research suggests I can do what I want using Regions to define bounding boxes for certain features.
It has also been suggested I should do this using network links, which I'm going to investigate as I think it's a better match for other reasons too.
Is this a standalone KML file? Or the KML returned as data for a network link?
In the first case I'm not sure this is even possible. I have seen layer transparency change with "camera altitude", so perhaps something like this is also possible on features? Then you could add both the single features and the groups features into the same KML file and make them visible based on "distance to camera"? Could be a new KML feature I missed, but you'd have the check the KML specification.
In the second case, you just return KML that matches the given network link viewport information. Based on the bounding box you get, you can subdivide that box into a grid and cluster per box. If you have one feature in a box, return the feature. If you have more than one in a box, return just a "grouped feature" for that box. The clustering will then automatically change when the user moves around in Google Earth: after each camera change your network link URL is called again and you again do feature selection and clustering with the given bounding box viewport. This makes your clustering dynamic.
Does this help?