As you're going through the points, keep track of the min/max x and y, then use those values to set the extent (the boundaries).<div><br></div><div>While you can do this in Javascript, we ended up doing that calculation in the server-side call that got the points, and sending it over with the json that used to populate the array of points.</div>
<div><br></div><div>Tac<br><br><div class="gmail_quote">On Tue, Nov 8, 2011 at 8:30 AM, BalaVignesh Kasinathan <span dir="ltr"><<a href="mailto:kbalavignesh@gmail.com">kbalavignesh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br> I want to draw the line (route using x,y coordinate points) over the map as vector layer. After route drawn on map, i want to adjust the zoom level to show the complete route. How can i do this? Is there any direct way to do this? If not how to do using math calculations?<br>
<br>Regards,<br>Bala<br>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br></div>