[OpenLayers-Users] Looking for Example interface for auto-re-centering of view (from URL call)

Arnd Wippermann arnd.wippermann at web.de
Wed Oct 24 14:17:56 PDT 2012


 
You can use 

/**
 * Function: getParameters
 * Parse the parameters from a URL or from the current page itself into a 
 *     JavaScript Object. Note that parameter values with commas are
separated
 *     out into an Array.
 * 
 * Parameters:
 * url - {String} Optional url used to extract the query string.
 *                If url is null or is not supplied, query string is taken 
 *                from the page location.
 * 
 * Returns:
 * {Object} An object of key/value pairs from the query string.
 */
OpenLayers.Util.getParameters = function(url) {

to parse the url and use the parameters to do something like Curtis
suggested.

Arnd 


________________________________

Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Basques,
Bob (CI-StPaul)
Gesendet: Mittwoch, 24. Oktober 2012 21:47
An: openlayers-users at lists.osgeo.org
Betreff: [OpenLayers-Users] Looking for Example interface for
auto-re-centering of view (from URL call)


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



More information about the Users mailing list