[OpenLayers-Users] Highlighting Feature on KML Layer

Phil Scadden p.scadden at gns.cri.nz
Tue Oct 9 15:13:41 PDT 2012


> I am new to web mapping and to OpenLayers. I have created a basic map 
> that has a base layer and a KML vector layer.  The features in the KML 
> vector layer have several attributes.  When opening my map, is it 
> possible to highlight and zoom to a specific feature in the KML vector 
> layer based on one of the attributes?
>

You will note that google isnt good about providing that functionality 
themselves in their products. KML is a very flexible format. You can 
define attributes for a featureset in the set header and then provide 
just the data for the feature ( as you would for a "normal" layer), but 
you can also have attribute and data for each feature (ie each feature 
could have different attributes). Furthermore the KML could just be a 
network link.

In short, I dont think it is implemented in OL but maybe others would 
prove me wrong. If you are stuck using KML vector files, then I think 
you will need custom code to pick your way through a loaded KML layer 
feature entries. If you have option of not using KML than I would 
strongly consider it. If your data is in say geoserver then you can 
create a WFS kml link to view in GE from your web application but using 
KML directly is slow and limited.

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121010/be10a2cd/attachment.html>


More information about the Users mailing list