Per the docs for Control "Controls by default are added to the map they are contained within however it is possible to add a control to an external div by passing the div in the options parameter."
which seems to be completely not like the source code at http://openlayers.org/dev/examples/mouse-position.html So, I have the following <div id="map"></div> <div id="coords"></div> <script type="text/javascript"> // The following works, but the mouse position is displayed on the map var ctrl_coords = new OpenLayers.Control.MousePosition(); map.addControl(ctrl_coords); // The following does not work var ctrl_coords = new OpenLayers.Control({div: "coords"}); ctrl_coords.MousePosition(); map.addControl(ctrl_coords); // The following also does not work var ctrl_coords = new OpenLayers.Control.MousePosition({div: "coords"}); map.addControl(ctrl_coords); </script> Pointers please, as I want to display the mouse position inside the "coords" div. Does the documentation need to be updated as well? -- Puneet Kishor _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
