>       final Layer layerOSMTilesAtHome = new OSM("Osmarender",
> OSMLayer.TilesAtHome);

The "Osmarender" renderer became unavailable recently (not sure why).
Comment out the lines that refer to it, and to "layerOSMTilesAtHome".

This has nothing to do with Wicket.

-- 
Michael Allan

Toronto, +1 416-699-9528
http://zelea.com/


datazuul said:
> Hi I tried to embed an openstreetmap in my page with the code from
> SimpleOpenStreetMapPage (wicketstuff openlayers example):
> 
>         final List<Layer> layers = new ArrayList<Layer>();
> 
>       final Layer layerOSMTilesAtHome = new OSM("Osmarender",
> OSMLayer.TilesAtHome);
>       final Layer layerOSMMapnik = new OSM("Mapnik", OSMLayer.Mapnik);
>       final Layer layerOSMCycleMap = new OSM("CycleMap", OSMLayer.CycleMap);
> 
>       layers.add(layerOSMMapnik);
>       layers.add(layerOSMTilesAtHome);
>       layers.add(layerOSMCycleMap);
> 
>       final HashMap<String, String> mapOptions = new HashMap<String, 
> String>();
>       final Bounds boundsExtend = new Bounds(new LonLat(-20037508.34,
> -20037508.34), new LonLat(20037508.34,
>               20037508.34));
>       mapOptions.put("maxExtent", boundsExtend.getJSconstructor());
>       mapOptions.put("projection", "new 
> OpenLayers.Projection('EPSG:900913')");
>       mapOptions.put("displayProjection", "new
> OpenLayers.Projection('EPSG:4326')");
>       mapOptions.put("units", "'meters'");
>       mapOptions.put("maxResolution", "156543");
>       mapOptions.put("numZoomLevels", "18");
> 
>       final OpenLayersMap map = new OpenLayersMap("map", true, layers,
> mapOptions);
> 
>       map.addControl(Control.LayerSwitcher);
>       map.addControl(Control.MousePosition);
>       map.addControl(Control.KeyboardDefaults);
> 
>       // map.setCenter(new LonLat(10.2, 48.9));
>       // map.setZoom(3);
> 
>       add(map);
> 
> but nothing is rendered.
> 
> Javascript error: 
> Error: OpenLayers.Layer.OSM.Osmarender is not a constructor
> Line: var osm26507926 =new OpenLayers.Layer.OSM.Osmarender('Osmarender');
> 
> Anyone using OpenLayersMap and knows how to get it working?
> 
> (I already tried this fix, mentioned by another user:
> private static final String OPEN_LAYERS_VERSION = "2.11"; in OpenLayersMap,
> didn't help)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to