Lucas Vickers wrote:
Your assumption about <refreshVisibility> is correct, I have signed up to track the feature.
Next, I think you are right I won't need region support. Even if I am displaying 4000 units I doubt it will be a huge deal.
Let me explain in depth what I want, as I'm not sure I can achieve it in GeoServer: Again this is all for Google KML.
I would like to display X number of taxis. Say 4,000 tops. These taxis will be grouped into two separate groups based on a database flag. Let's say cars with issues and cars with no issue.
I would like the dispatcher to be able to have a list of placemarks in google, I want two lists: cars w/o issues, cars w/ issues.
At any point in time if a user clicks on an item within the placemark list (one of the cars), it will zoom into this item. I believe this is standard.
When the user zooms out, I will not show cars w/o issues on the map, only cars w/ issues (the cars w/ issues are ALWAYS visible).
However, I want the cars w/o issues to stay in the placemark list independent of zoom level. So I want the placemarks independent of zoom but the actual taxi visibility (on the map) dependent on zoom.
Here's where I'm confused:
- I do not know how I could group cars into two separate placemark lists. Would I need separate KML links for this and each just reads different data?
No. You can get a single KML document that links to multiple datasets from GeoServer's KML reflector simply by adding multiple layers (comma-separated) to the layers parameter in the URL. For example, if taxi:okay and taxi:withissues are your two layers, then the non-regionated link would be http://localhost:8080/geoserver/wms/kml?layers=taxi:okay,taxi:withissues&mode=download . You may find it more convenient to do this with a Postgres view, so that you can move features between the two featuretypes just by modifying an attribute of the data.
- I understand how to use SLD to hide the cars w/o issues at certain zoom levels, but then I believe the item will not show up in my placemark list. Is there a way around this?
Well, KML is a special case with regard to zoom levels, because GeoServer doesn't know how big your Google Earth window is (and our style translator doesn't encode the scale denominators so that Google Earth can understand them, although that would be a nice feature, and doable using a similar technique to the one used in regionated output). You shouldn't rely on zoom levels in KML output, at least for now. The best workaround I can come up with right now is to have the two groups of taxis in separate folders, as described above, and manually toggling the unwanted list.
- Can I control the icon that is displayed in the placemark list? Is the information derived from the label (point) settings or is it sometihng different?
For features, yes. I don't believe it is possible to customize the actual folder icon, and GeoServer itself definitely does not currently support that.
Many thanks!
On Mon, Mar 9, 2009 at 9:10 AM, David Winslow <dwinslow@anonymised.com <mailto:dwinslow@anonymised.com>> wrote:
Lucas Vickers wrote:
Hello,
I have spent the last few days learning GeoServer and I am
very impressed!
Using a mixture of MySQL and SLD I am able to have accurate
control over how my data is presented.
That said, I am gearing my dataset for google earth. I would
like to display say 100 taxi cabs.
I want to automatically refresh my google earth KML once every
5 seconds, and I would also like to group certain taxi cabs
into a placemark folder.
My two questions
1 - Is it possible to configure GeoServer to return
<refreshVisiblity>1</refreshVisiblity> in the KML, or must the
user manually set it when adding the KML link?
Currently this functionality does not exist, but it would be
fairly straightforward to add. I've created an issue
(http://jira.codehaus.org/browse/GEOS-2702) in GeoServer's bug
tracker for this. If you are interested, you can sign up for a
JIRA account and subscribe to the watch list for updates on
progress on that issue. I assumed that you meant
<refreshMode>onInterval</refreshMode> rather than
<refreshVisibility>1</refreshVisibility> since onInterval tells
Google Earth to refresh periodically, while refreshVisibility just
tells it to unhide placemarks when a networklink is refreshed.
Please correct me if this assumption is wrong.
2 - Can I control what items show up in the google earth
places menu? Can I control the folder grouping? Can I
control the icon? All the examples I have been looking at
seem to have placemark names along the lines of 01, 02, 10,
14, etc. They seem to be a repetitive tree structure which
confuses me further.
This structure allows GeoServer's regionated KML to work.
Unfortunately, it doesn't seem that Google Earth allows you to
hide the structure of the KML, so we can't do anything about the
messy folders in regionated output (except maybe provide a better
name). For a dataset of only 100 points, you probably do not need
regionated output, so try appending &mode=download to the URL.
This will give you an unstructured document with all the
placemarks in a single folder.
I have looked around and have not found answers to these
questions, so if I am repeating a topic I apologize.
thank you,
Lucas
Hope this helps.
--
David Winslow
OpenGeo - http://opengeo.org/