wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From datazuul <ralf.eichin...@pixotec.de>
Subject Wicketstuff - Openlayers: not working with wicket 1.5.5?
Date Fri, 30 Mar 2012 21:00:13 GMT
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)


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicketstuff-Openlayers-not-working-with-wicket-1-5-5-tp4520366p4520366.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message