<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><font face="Times New Roman, Times,
serif">Do you have, or know where I could find, an example of
this being implemented on KML</font> layer?<br>
<pre class="moz-signature" cols="72">Aaron E-J
<a class="moz-txt-link-freetext" href="http://www.otherrealm.org">http://www.otherrealm.org</a>
<a class="moz-txt-link-freetext" href="http://www.prospectdesigns.com">http://www.prospectdesigns.com</a>
Vision without action is a daydream,
Action without vision is a nightmare,
One needs both to succeed.
</pre>
On 7/3/2012 5:52 PM, Greg Allensworth wrote:<br>
</div>
<blockquote cite="mid:4FF36980.2030605@greeninfo.org" type="cite">On
7/3/2012 2:11 PM, Aaron E-J wrote:
<br>
<blockquote type="cite">Is there an easy way to center and zoom
the map automatically based on
<br>
the placemarks that are on it?I have it so that one can filter
<br>
placemarks based on user input but I'm not sure how to
dynamically
<br>
update the map to fit the newly filtered content.Thanks for any
insight
<br>
that can be given regarding this matter.
<br>
</blockquote>
<br>
An OpenLayers.Layer.Markers instance, has a method called
getDataExtent() This should do most of what you want.
<br>
<br>
It's not automatic, though. You'd still need to call
map.zoomToExtent() after the markers have been added to the layer.
<br>
<br>
<a class="moz-txt-link-freetext" href="http://dev.openlayers.org/docs/files/OpenLayers/Layer/Markers-js.html">http://dev.openlayers.org/docs/files/OpenLayers/Layer/Markers-js.html</a>
<br>
<br>
</blockquote>
<br>
<br>
</body>
</html>