This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Adding an OpenStreet baseMap

0

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.6k18248554

Source code available on GitHub .