Why not ask your question on the new OpenStreetMap Community Forum?

Hello !

I would like to start with a simple map example and I am here: http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example

There is somethings basically wrong: The OSM library mentioned, "OpenLayers.js" does not exists. If you go to their webseite, you'll lost in space, because there are hundreds of scripts, but not that mentioned one.

Any help would be great !

Thanks anyway and best regards,


asked 19 Nov '15, 04:51

mabra77's gravatar image

accept rate: 0%

edited 19 Nov '15, 06:15

aseerel4c26's gravatar image

aseerel4c26 ♦

the www.openstreetmap.org website currently uses leaflet as the library for slippy maps instead of OpenLayers. You can follow the example here instead: http://leafletjs.com/examples/quick-start.html

permanent link

answered 19 Nov '15, 06:11

PlaneMad's gravatar image

accept rate: 33%

edited 19 Nov '15, 19:19

aseerel4c26's gravatar image

aseerel4c26 ♦

I have put up a note on https://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example#Instructions - with a download link for version two (which the example seems to be based on). The example works - I have just tried it. A example for the current version 3 is at http://openlayers.org/en/v3.11.1/doc/quickstart.html

permanent link

answered 19 Nov '15, 06:26

aseerel4c26's gravatar image

aseerel4c26 ♦
accept rate: 18%

edited 19 Nov '15, 06:54

In general people prefer to use Leaflet as it is somewhat less complex than OpenLayers and works better on mobile devices. Chris Hill wrote a few how-tos for Leaflet on this blog (e.g. http://chris-osm.blogspot.co.uk/2013/11/using-leaflet-v07_21.html): these are probably better documented and easier to follow than the wiki.

permanent link

answered 19 Nov '15, 11:00

SK53's gravatar image

SK53 ♦
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

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



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:


question asked: 19 Nov '15, 04:51

question was seen: 3,331 times

last updated: 19 Nov '15, 19:19

powered by OSQA