In top right corner there is a "+" menu that has a lot of baselayers and overlays. Where is that menu defined? asked 16 Nov '11, 15:41 alexz |
The main bit of javascript for doing this is a map.js file. In the rails app on github, you can find this under '/app/assets/map.js.erb' OpenLayers has some built-in pre-packaging of definitions of OpenStreetMap layers. We have a local (modified?) copy of this in our repo here ...but this comes with OpenLayers. But perhaps you're looking for more basic information: The OpenStreetMap front page uses OpenLayers, but it is not the easiest place to learn about how to invoke OpenLayers. Here's an easier example of invoking OpenLayers with many layers (do 'view source' to see how that works) answered 16 Nov '11, 16:10 Harry Wood Thanks a lot for that but i was looking for the definition of the menu itself. I want to add there a new layer: the marker's layer, the one that is activated when the request has mlon and mlat values. I use it to add some popup markers. I want that layer to be in the menu too.
(17 Nov '11, 07:29)
alexz
|
The '+' is a standard feature of OpenLayers, which is one of the javascript libraries that can be used to present a movable map (slippy map) on a web page. An alternate library is Leaflet; read more at http://leaflet.cloudmade.com answered 17 Nov '11, 11:10 ChrisH Thx, but i don't want to implement a different technology.
(17 Nov '11, 14:18)
alexz
|