0

I'm trying to work my way through this wiki page to add OSM into a OpenLayers map I am working on, however I cannot even get the first example to work.

I have downloaded OpenLayers V3, copied the code into a text file (saved as html), then copied "os.js" into the same folder, not "openlayers.js" as it says in the example, this doesn't appear to exist so i think i copied the correct one. I'm also not sure what it means as the "theme directory" as well.

Anyone managed to get this to work, if so then how? And is there any other ways this could be done?

  • Which browser have you used to check html file? If Chrome, it can be problem with src file (it won't read files like that). – dmh126 Mar 8 '15 at 18:40
  • Tried it in both Chrome and IE and not got anywhere with it yet... – Joshua Dickerson Mar 8 '15 at 19:24
  • 1
    I'm quite sure that page uses OL2, not 3. They are not compatible. – underdark Mar 8 '15 at 19:42
  • Any idea what would change to make it work in OL3? – Joshua Dickerson Mar 8 '15 at 19:46
  • 1
    Simple openlayers 3 example jsfiddle.net/29bsw/1 your source is for openlayers 2. – Mapperz Mar 8 '15 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.