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

Hey everybody.

I work with GeoServer using Apache Tomcat in NetBeans. What I want is using OpenStreetMap as base map of my data. So I added this code:

layer = new OpenLayers.Layers.OSM(); map.addLayer([layer, layer1, layer2]);

before adding this code everything works perfectly, but now when I try to execute my HTML page, fireBug shows the folowing error

TypeError: OpenLayers.Layer.OSM is not a constructor. osm = new OpenLayers.Layer.OSM();

Thanks for your collaboration :)

This question is marked "community wiki".

asked 23 Jul '14, 16:34

Aissm12's gravatar image

accept rate: 0%

edited 24 Jul '14, 00:34

aseerel4c26's gravatar image

aseerel4c26 ♦

Be the first one to answer this question!
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: 23 Jul '14, 16:34

question was seen: 3,250 times

last updated: 24 Jul '14, 00:34

powered by OSQA