[OpenLayers-Users] help!
Gregor at HostGIS
gregor at hostgis.com
Tue May 12 17:22:29 EDT 2009
> i have made the search, but i'm been abling to do the go to street, zoom
> to the selected street by the search.
> can anyone help me ???
One approach which I use now and then: In the search results page, where
I say "Found 1 result, blah blah" I also add some JavaScript to recenter
the map as needed.
There are a few approaches to that, probably the easiest being that the
server side of your search also finds the bbox of the matching road,
then supplies that in the HTML:
var extent = new OpenLayers.Bounds(<?php fill it in here ?>);
map.zoomToExtent(extent);
Is that enough to get you moving?
--
HostGIS, Open Source solutions for the global GIS community
Greg Allensworth - SysAdmin, Programmer, GIS Person, Security
Network+ Server+ A+ Security+
More information about the Users
mailing list