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

Aissm12
1112
accept rate: 0%

edited 24 Jul '14, 00:34

aseerel4c26's gravatar image

aseerel4c26 ♦
32.1k16239551

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

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:

×114
×11
×9

question asked: 23 Jul '14, 16:34

question was seen: 2,525 times

last updated: 24 Jul '14, 00:34

powered by OSQA