[OpenLayers-Users] selecting a feature in a base layer

new2ms4w nagal005 at umn.edu
Sat Feb 14 22:04:42 EST 2009


Hi,

I used MapServer with OpenLayers to display the road map of a country. Now,
I want to select a particular and add a moving object to it.

Adding a moving object to the map is easy. ( I drew a point on the map and
I'm just moving it by calling OpenLayers.Geometry.move() )
However I want these points to move only on roads.

So, first I need to select a road and then add the moving object. This is
the hard part for me.

The examples section has an example (OpenLayers Select Feature Example
http://www.openlayers.org/dev/examples/select-feature.html )  showing how to
select a point, line or polygon (or any vector feature) which I draw there
by either drawing a box or moving mouse over the feature etc.

But how do we select a feature from the base layer? (Does the base layer
even have features at all?)
By this what I mean is how do we select the country boundaries in the above
webpage. 

Thank you for your time. I'm a student just started using OpenLayers around
1 week back. So, please bear with my questions.

~PN
-- 
View this message in context: http://n2.nabble.com/selecting-a-feature-in-a-base-layer-tp2328559p2328559.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list