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's gravatar image

alexz
225212226
accept rate: 0%


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)

permanent link

answered 16 Nov '11, 16:10

Harry%20Wood's gravatar image

Harry Wood
9.3k2486126
accept rate: 13%

edited 16 Nov '11, 16:11

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
-1

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

permanent link

answered 17 Nov '11, 11:10

ChrisH's gravatar image

ChrisH
4.1k134262
accept rate: 15%

Thx, but i don't want to implement a different technology.

(17 Nov '11, 14:18) alexz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×548
×114

question asked: 16 Nov '11, 15:41

question was seen: 3,529 times

last updated: 17 Nov '11, 14:18

powered by OSQA