[OpenLayers-Users] Is there an easy way to center and zoom the map automatically based on the placemarks that are on it?

Phil Scadden p.scadden at gns.cri.nz
Mon Jul 9 15:17:05 PDT 2012


On 10/07/2012 3:37 a.m., Aaron E-J wrote:
> I'm getting "undefined" when I try to call kmllayer.features using the 
> script provided in the last post. I am able to view the 
> 'feature.geometry' when the feature is coming from a click event, I 
> just have not figured out how to get all features available from the 
> kml layer (keeps coming up undefined no matter what I try).Any more 
> examples would be greatly appreciated (working links to complete 
> examples would be awesome), thanks for what I have gotten so far.

Well looking at the docs, a vector layer should have a "features" 
properties after it is loaded. Where are you doing the checking?

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/20120710/5509b549/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 611 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120710/5509b549/attachment.png>


More information about the Users mailing list