[OpenLayers-Users] Zoom to feature and highlight it

kennyken asseltine1 at hotmail.com
Thu Aug 20 10:15:55 EDT 2009


I'm going to clarify my problem a little bit.

What I'm trying to do is take a parameter from the user (parameter is used
to uniquely identify a property on the map), find the location of that
property, and center the map on it.

I figured the easiest way to do this would be to give each property an X and
Y feature (which I did using  http://www.youtube.com/watch?v=tWfLoqNu3Bo
this tutorial ). I query GeoServer, get the X and Y coordinates that go with
that property, and then use the map.setCenter() function to zoom in on it.

Unfortunately, this isn't working for me. The map ends up centering
somewhere completely wrong. It seems to be almost random where the map ends
up. I'm not sure, but I think it might have something to do with the
projection. I have Google maps as my base layer (EPSG:900913), and i believe
my shapefile is EPSG:4326.

Also, once I get my map centering on the property, I would like to have it
highlight the property as well. Not sure where to even start for that one,
so any guidance would be appreciated.
-- 
View this message in context: http://n2.nabble.com/Zoom-to-feature-and-highlight-it-tp3472183p3479210.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list