[OpenLayers-Users] TextLayer with Framecloud popup
Christopher Schmidt
crschmidt at metacarta.com
Wed Jun 25 17:54:37 EDT 2008
On Wed, Jun 25, 2008 at 02:28:20PM -0700, Andrew de klerk wrote:
>
> Ok, please forgive my late night googling skills (tired eyes!), and thanks
> for the prompt response. If i look at that link you have said:
>
> "Generally, the answer is 'no, and why are you still using a Layer.Text?
> Use a Layer.GML with a format: OpenLayers.Format.Text and a
> selectFeature control instead.'
>
> The reason why I am using Layer.text is because I specifically don't want my
> end users to have to select a tool to click on a feature/marker.
They shouldn't need to.
var control = new OpenLayers.Control.SelectFeature(layer);
map.addControl(control);
control.activate();
Now the select control is active, and clicks on the features will
activate a popup.
See, for example: http://openlayers.org/dev/examples/sundials.html
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list