[OpenLayers-Users] Looking for Example interface for auto-re-centering of view (from URL call)
Curtis Olson
curtolson at flightgear.org
Wed Oct 24 13:06:51 PDT 2012
Hi Bob,
I have used map.panTo(lonlat); and map.moveTo(lonlat); here in my project.
panTo() is fancy and smooth if you are running on a faster computer, but
is laggy and jumpy if you are running on a slower device (like maybe a
smart phone.) moveTo() just does a direct jump. I've
used map.getPixelFromLonLat(lonlat); to get the pixel location of the item
of interest and then if it's too far from center I do the call to moveTo()
Hope that helps, but if not, sorry for the line noise. :-)
Curt.
On Wed, Oct 24, 2012 at 2:47 PM, Basques, Bob (CI-StPaul) <
bob.basques at ci.stpaul.mn.us> wrote:
> All,****
>
> ** **
>
> Anyone know of a demo that Auto-recenters view from a URL call. Want to
> zoom to a point on a map, and recenter the view based on a URL.****
>
> ** **
>
> The idea is to stay tuned to a tracking GPS in a Fleet asset, and
> basically follow along as they move.****
>
> ** **
>
> Thanks****
>
> ** **
>
> Bobb****
>
> ** **
>
> ** **
>
> ** **
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
--
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121024/5720458a/attachment.html>
More information about the Users
mailing list