Re: openstreetmap in openlayers
Hi Nino, thanks for the commit access. I have now added the support for openstreetmap maps. I also added a simple example map. Maybe someone could review my solution. regards, richard -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22576668.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
p in openlayers: >> >>> > http://wiki.openstreetmap.org/wiki/OpenLayers >> >>> > >> >>> > But it doesn't use the OpenLayers.Layer.TMS object. It adds its own >> >>> > import (http://openstreetmap.org/openlayers/OpenStreetMap.js ) and >> >>> uses >> >>> > an OpenLayers.Layer.OSM object. >> >>> > >> >>> > Perhaps your integration should use that instead? >> >>> > >> >>> > There is a ticket for something similiar that might get into >> >>> OpenLayers >> >>> > 2.8 (http://trac.openlayers.org/ticket/1950) >> >>> > >> >>> > Mike >> >>> > >> >>> >> I tried a few things and I think I managed the integration of >> >>> >> openstreetmaps. >> >>> >> The browser is contacting the osm tile server BUT everything I get >> >>> are >> >>> >> pink >> >>> >> tiles? >> >>> >> >> >>> >> >> >>> >> Here is the output of the final html page: >> >>> >> >> >>> >> >> >>> >> >> >>> >> Wicket Quickstart Archetype Homepage >> >>> >> > >>> >> >> >>> >> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"> >> >>> >> > >>> >> >> >>> >> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"> >> >>> >> > >>> >> >> >>> >> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"> >> >>> >> > >>> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/ >> >>> >> wicketAjaxDebugEnable=true; >> >>> >> /*-->]]>*/ >> >>> >> >> >>> >> > >>> >> src="<a rel="nofollow" href="http://openlayers.org/api/OpenLayers.js"">http://openlayers.org/api/OpenLayers.js"</a>;> >> >>> >> >> >>> >> > >>> >> >> >>> >> src="resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js"> >> >>> >> <!--/*--><![CDATA[/*><!--*/ >> >>> >> Wicket.Event.add(window, "load", function(event) { function >> >>> >> osm_getTileURL(bounds) {var res = this.map.getResolution();var x = >> >>> >> Math.round((bounds.left - this.maxExtent.left) / (res * >> >>> >> this.tileSize.w));var y = Math.round((this.maxExtent.top - >> >>> bounds.top) / >> >>> >> (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = >> >>> >> Math.pow(2, z); if (y < 0 || y >= limit) { return >> >>> >> OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % >> >>> >> limit) + >> >>> >> limit) % limit; return this.url + z + '/' + x + '/' + y + >> '.' >> >>> + >> >>> >> this.type; } } ;}); >> >>> >> /*-->]]>*/ >> >>> >> >> >>> >> <!--/*--><![CDATA[/*><!--*/ >> >>> >> Wicket.Event.add(window, "domready", function(event) { >> >>> >> var options = {maxResolution: 156543.0339, >> >>> >> projection: new OpenLayers.Projection('EPSG:900913'), >> >>> >> numZoomLevels:18, >> >>> >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, >> >>> 20037508.34, >> >>> >> 20037508.34), >> >>> >> units: 'm', >> >>> >> displayProjection: new OpenLayers.Projection('EPSG:4326')}; >> >>> >> new WicketOMap('map7', options); >> >>> >> var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', >> >>> >> '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', >> >>> >> attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , >> >>> >> displayOutsideMaxExtent: true}); >> >>> >> Wicket.omaps['map7'].addLayer(osm23008635,23008635); >> >>> >> Wicket.omaps['map7'].zoomToMaxExtent(); >> >>> >> Wicket.omaps['map7'].addControl('LayerSwitcher', new >> >>> >> OpenLayers.Control.LayerSwitcher()); >> >>> >> Wicket.omaps['map7'].setPopupId('content8'); >> >>> >> ;}); >> >>> >> /*-->]]>*/ >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> > >>> id="infoWindow9"> >> >>> >> >> >>> >> > >>> id="content8"> >> >>> >> >> >>> >> >> >>> >> >> >>> >> > >>> >> id="map7"> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> Any ideas? >> >>> >> >> >>> >> >> >>> >> >> >>> > >> >>> > >> >>> > >> - >> >>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >>> > For additional commands, e-mail: users-h...@wicket.apache.org >> >>> > >> >>> > >> >>> > >> >>> >> >>> -- >> >>> View this message in context: >> >>> >> http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22369076.html >> >>> Sent from the Wicket - User mailing list archive at Nabble.com. >> >>> >> >>> >> >>> - >> >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >>> For additional commands, e-mail: users-h...@wicket.apache.org >> >>> >> >>> >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22387469.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >
Re: openstreetmap in openlayers
rg/ticket/1950) > >>> > > >>> > Mike > >>> > > >>> >> I tried a few things and I think I managed the integration of > >>> >> openstreetmaps. > >>> >> The browser is contacting the osm tile server BUT everything I get > >>> are > >>> >> pink > >>> >> tiles? > >>> >> > >>> >> > >>> >> Here is the output of the final html page: > >>> >> > >>> >> > >>> >> > >>> >> Wicket Quickstart Archetype Homepage > >>> >> >>> >> > >>> > src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"> > >>> >> >>> >> > >>> > src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"> > >>> >> >>> >> > >>> > src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"> > >>> >> >>> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/ > >>> >> wicketAjaxDebugEnable=true; > >>> >> /*-->]]>*/ > >>> >> > >>> >> >>> >> src="<a rel="nofollow" href="http://openlayers.org/api/OpenLayers.js"">http://openlayers.org/api/OpenLayers.js"</a>;> > >>> >> > >>> >> >>> >> > >>> > src="resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js"> > >>> >> <!--/*--><![CDATA[/*><!--*/ > >>> >> Wicket.Event.add(window, "load", function(event) { function > >>> >> osm_getTileURL(bounds) {var res = this.map.getResolution();var x = > >>> >> Math.round((bounds.left - this.maxExtent.left) / (res * > >>> >> this.tileSize.w));var y = Math.round((this.maxExtent.top - > >>> bounds.top) / > >>> >> (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = > >>> >> Math.pow(2, z); if (y < 0 || y >= limit) { return > >>> >> OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % > >>> >> limit) + > >>> >> limit) % limit; return this.url + z + '/' + x + '/' + y + > '.' > >>> + > >>> >> this.type; } } ;}); > >>> >> /*-->]]>*/ > >>> >> > >>> >> <!--/*--><![CDATA[/*><!--*/ > >>> >> Wicket.Event.add(window, "domready", function(event) { > >>> >> var options = {maxResolution: 156543.0339, > >>> >> projection: new OpenLayers.Projection('EPSG:900913'), > >>> >> numZoomLevels:18, > >>> >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, > >>> 20037508.34, > >>> >> 20037508.34), > >>> >> units: 'm', > >>> >> displayProjection: new OpenLayers.Projection('EPSG:4326')}; > >>> >> new WicketOMap('map7', options); > >>> >> var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', > >>> >> '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', > >>> >> attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , > >>> >> displayOutsideMaxExtent: true}); > >>> >> Wicket.omaps['map7'].addLayer(osm23008635,23008635); > >>> >> Wicket.omaps['map7'].zoomToMaxExtent(); > >>> >> Wicket.omaps['map7'].addControl('LayerSwitcher', new > >>> >> OpenLayers.Control.LayerSwitcher()); > >>> >> Wicket.omaps['map7'].setPopupId('content8'); > >>> >> ;}); > >>> >> /*-->]]>*/ > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> >>> id="infoWindow9"> > >>> >> > >>> >> >>> id="content8"> > >>> >> > >>> >> > >>> >> > >>> >> >>> >> id="map7"> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> Any ideas? > >>> >> > >>> >> > >>> >> > >>> > > >>> > > >>> > - > >>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>> > For additional commands, e-mail: users-h...@wicket.apache.org > >>> > > >>> > > >>> > > >>> > >>> -- > >>> View this message in context: > >>> > http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22369076.html > >>> Sent from the Wicket - User mailing list archive at Nabble.com. > >>> > >>> > >>> - > >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>> For additional commands, e-mail: users-h...@wicket.apache.org > >>> > >>> > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22387469.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: openstreetmap in openlayers
.WicketAjaxReference/wicket-ajax.js"> >>> >> >> >> >>> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"> >>> >> >> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/ >>> >> wicketAjaxDebugEnable=true; >>> >> /*-->]]>*/ >>> >> >>> >> >> >> src="<a rel="nofollow" href="http://openlayers.org/api/OpenLayers.js"">http://openlayers.org/api/OpenLayers.js"</a>;> >>> >> >>> >> >> >> >>> src="resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js"> >>> >> <!--/*--><![CDATA[/*><!--*/ >>> >> Wicket.Event.add(window, "load", function(event) { function >>> >> osm_getTileURL(bounds) {var res = this.map.getResolution();var x = >>> >> Math.round((bounds.left - this.maxExtent.left) / (res * >>> >> this.tileSize.w));var y = Math.round((this.maxExtent.top - >>> bounds.top) / >>> >> (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = >>> >> Math.pow(2, z); if (y < 0 || y >= limit) { return >>> >> OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % >>> >> limit) + >>> >> limit) % limit; return this.url + z + '/' + x + '/' + y + '.' >>> + >>> >> this.type; } } ;}); >>> >> /*-->]]>*/ >>> >> >>> >> <!--/*--><![CDATA[/*><!--*/ >>> >> Wicket.Event.add(window, "domready", function(event) { >>> >> var options = {maxResolution: 156543.0339, >>> >> projection: new OpenLayers.Projection('EPSG:900913'), >>> >> numZoomLevels:18, >>> >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, >>> 20037508.34, >>> >> 20037508.34), >>> >> units: 'm', >>> >> displayProjection: new OpenLayers.Projection('EPSG:4326')}; >>> >> new WicketOMap('map7', options); >>> >> var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', >>> >> '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', >>> >> attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , >>> >> displayOutsideMaxExtent: true}); >>> >> Wicket.omaps['map7'].addLayer(osm23008635,23008635); >>> >> Wicket.omaps['map7'].zoomToMaxExtent(); >>> >> Wicket.omaps['map7'].addControl('LayerSwitcher', new >>> >> OpenLayers.Control.LayerSwitcher()); >>> >> Wicket.omaps['map7'].setPopupId('content8'); >>> >> ;}); >>> >> /*-->]]>*/ >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >> id="infoWindow9"> >>> >> >>> >> >> id="content8"> >>> >> >>> >> >>> >> >>> >> >> >> id="map7"> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> >>> >> Any ideas? >>> >> >>> >> >>> >> >>> > >>> > >>> > - >>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> > For additional commands, e-mail: users-h...@wicket.apache.org >>> > >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22369076.html >>> Sent from the Wicket - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22387469.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
wicket-openlayersmap.js"> >> >> <!--/*--><![CDATA[/*><!--*/ >> >> Wicket.Event.add(window, "load", function(event) { function >> >> osm_getTileURL(bounds) {var res = this.map.getResolution();var x = >> >> Math.round((bounds.left - this.maxExtent.left) / (res * >> >> this.tileSize.w));var y = Math.round((this.maxExtent.top - bounds.top) >> / >> >> (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = >> >> Math.pow(2, z); if (y < 0 || y >= limit) { return >> >> OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % >> >> limit) + >> >> limit) % limit; return this.url + z + '/' + x + '/' + y + '.' >> + >> >> this.type; } } ;}); >> >> /*-->]]>*/ >> >> >> >> <!--/*--><![CDATA[/*><!--*/ >> >> Wicket.Event.add(window, "domready", function(event) { >> >> var options = {maxResolution: 156543.0339, >> >> projection: new OpenLayers.Projection('EPSG:900913'), >> >> numZoomLevels:18, >> >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, >> 20037508.34, >> >> 20037508.34), >> >> units: 'm', >> >> displayProjection: new OpenLayers.Projection('EPSG:4326')}; >> >> new WicketOMap('map7', options); >> >> var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', >> >> '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', >> >> attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , >> >> displayOutsideMaxExtent: true}); >> >> Wicket.omaps['map7'].addLayer(osm23008635,23008635); >> >> Wicket.omaps['map7'].zoomToMaxExtent(); >> >> Wicket.omaps['map7'].addControl('LayerSwitcher', new >> >> OpenLayers.Control.LayerSwitcher()); >> >> Wicket.omaps['map7'].setPopupId('content8'); >> >> ;}); >> >> /*-->]]>*/ >> >> >> >> >> >> >> >> >> >> >> >> > id="infoWindow9"> >> >> >> >> > id="content8"> >> >> >> >> >> >> >> >> > >> id="map7"> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Any ideas? >> >> >> >> >> >> >> > >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22369076.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22374438.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
7;map7', options); > >> var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', > >> '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', > >> attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , > >> displayOutsideMaxExtent: true}); > >> Wicket.omaps['map7'].addLayer(osm23008635,23008635); > >> Wicket.omaps['map7'].zoomToMaxExtent(); > >> Wicket.omaps['map7'].addControl('LayerSwitcher', new > >> OpenLayers.Control.LayerSwitcher()); > >> Wicket.omaps['map7'].setPopupId('content8'); > >> ;}); > >> /*-->]]>*/ > >> > >> > >> > >> > >> > >> id="infoWindow9"> > >> > >> id="content8"> > >> > >> > >> > >> >> id="map7"> > >> > >> > >> > >> > >> > >> > >> Any ideas? > >> > >> > >> > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > -- > View this message in context: > http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22369076.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: openstreetmap in openlayers
Thank you very much. That really helped a lot. I am now able to render the different openstreetmap layers (mapnik, ti...@home, cycleMap) with the above mentioned OpenLayers.Layer.OSM object. But there still exist some problems. It is not entirely possible to edit the maps with the wicketstuff project. Once the map is rendered there is no problem: dragging, zooming, layerswitching are working. But before rendering not all functions are working. For example the setCenter(lonlat, zoom) function of the wicketstuff openlayers contrib seems to do nothing with the map. Also the setZoom function did not worked at the beginning, but after some changes I got it working. I think the project is not entirely up to date with the openlayers api? Maybe a user who is more familiar with this project could give a statement about the problem. Michael O'Cleirigh wrote: > > Hello, > > Pink tiles means there is a mismatch somewhere between your layers. > > Does your openlayers javascript work correctly? (i.e. when not emitted > from wicket openlayers?) > > This page embeds an openstreet map in openlayers: > http://wiki.openstreetmap.org/wiki/OpenLayers > > But it doesn't use the OpenLayers.Layer.TMS object. It adds its own > import (http://openstreetmap.org/openlayers/OpenStreetMap.js ) and uses > an OpenLayers.Layer.OSM object. > > Perhaps your integration should use that instead? > > There is a ticket for something similiar that might get into OpenLayers > 2.8 (http://trac.openlayers.org/ticket/1950) > > Mike > >> I tried a few things and I think I managed the integration of >> openstreetmaps. >> The browser is contacting the osm tile server BUT everything I get are >> pink >> tiles? >> >> >> Here is the output of the final html page: >> >> >> >> Wicket Quickstart Archetype Homepage >> > src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"> >> > src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"> >> > src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"> >> > id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/ >> wicketAjaxDebugEnable=true; >> /*-->]]>*/ >> >> > src="<a rel="nofollow" href="http://openlayers.org/api/OpenLayers.js"">http://openlayers.org/api/OpenLayers.js"</a>;> >> >> > src="resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js"> >> <!--/*--><![CDATA[/*><!--*/ >> Wicket.Event.add(window, "load", function(event) { function >> osm_getTileURL(bounds) {var res = this.map.getResolution();var x = >> Math.round((bounds.left - this.maxExtent.left) / (res * >> this.tileSize.w));var y = Math.round((this.maxExtent.top - bounds.top) / >> (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = >> Math.pow(2, z); if (y < 0 || y >= limit) { return >> OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % >> limit) + >> limit) % limit; return this.url + z + '/' + x + '/' + y + '.' + >> this.type; } } ;}); >> /*-->]]>*/ >> >> <!--/*--><![CDATA[/*><!--*/ >> Wicket.Event.add(window, "domready", function(event) { >> var options = {maxResolution: 156543.0339, >> projection: new OpenLayers.Projection('EPSG:900913'), >> numZoomLevels:18, >> maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, >> 20037508.34), >> units: 'm', >> displayProjection: new OpenLayers.Projection('EPSG:4326')}; >> new WicketOMap('map7', options); >> var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', >> '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', >> attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , >> displayOutsideMaxExtent: true}); >> Wicket.omaps['map7'].addLayer(osm23008635,23008635); >> Wicket.omaps['map7'].zoomToMaxExtent(); >> Wicket.omaps['map7'].addControl('LayerSwitcher', new >> OpenLayers.Control.LayerSwitcher()); >> Wicket.omaps['map7'].setPopupId('content8'); >> ;}); >> /*-->]]>*/ >> >> >> >> >> >> > id="infoWindow9"> >> >> > id="content8"> >> >> >> >> > id="map7"> >> >> >> >> >> >> >> Any ideas? >> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22369076.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
Hello, Pink tiles means there is a mismatch somewhere between your layers. Does your openlayers javascript work correctly? (i.e. when not emitted from wicket openlayers?) This page embeds an openstreet map in openlayers: http://wiki.openstreetmap.org/wiki/OpenLayers But it doesn't use the OpenLayers.Layer.TMS object. It adds its own import (http://openstreetmap.org/openlayers/OpenStreetMap.js ) and uses an OpenLayers.Layer.OSM object. Perhaps your integration should use that instead? There is a ticket for something similiar that might get into OpenLayers 2.8 (http://trac.openlayers.org/ticket/1950) Mike I tried a few things and I think I managed the integration of openstreetmaps. The browser is contacting the osm tile server BUT everything I get are pink tiles? Here is the output of the final html page: Wicket Quickstart Archetype Homepage ]]>*/ http://openlayers.org/api/OpenLayers.js";> ]]>*/ ]]>*/ Any ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: openstreetmap in openlayers
I tried a few things and I think I managed the integration of openstreetmaps. The browser is contacting the osm tile server BUT everything I get are pink tiles? Here is the output of the final html page: Wicket Quickstart Archetype Homepage <!--/*--><![CDATA[/*><!--*/ wicketAjaxDebugEnable=true; /*-->]]>*/ http://openlayers.org/api/OpenLayers.js"</a>;> <!--/*--><![CDATA[/*><!--*/ Wicket.Event.add(window, "load", function(event) { function osm_getTileURL(bounds) {var res = this.map.getResolution();var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h)); var z = this.map.getZoom(); var limit = Math.pow(2, z); if (y < 0 || y >= limit) { return OpenLayers.Util.getImagesLocation() + '404.png'; } else { x = ((x % limit) + limit) % limit;return this.url + z + '/' + x + '/' + y + '.' + this.type; } } ;}); /*-->]]>*/ <!--/*--><![CDATA[/*><!--*/ Wicket.Event.add(window, "domready", function(event) { var options = {maxResolution: 156543.0339, projection: new OpenLayers.Projection('EPSG:900913'), numZoomLevels:18, maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34), units: 'm', displayProjection: new OpenLayers.Projection('EPSG:4326')}; new WicketOMap('map7', options); var osm23008635 =new OpenLayers.Layer.TMS('OpenStreetMap (Mapnik)', '<a rel="nofollow" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>', {type: 'png', attribution: <a rel="nofollow" href="http://www.openstreetmap.org/">http://www.openstreetmap.org/</a> OpenStreetMap , displayOutsideMaxExtent: true}); Wicket.omaps['map7'].addLayer(osm23008635,23008635); Wicket.omaps['map7'].zoomToMaxExtent(); Wicket.omaps['map7'].addControl('LayerSwitcher', new OpenLayers.Control.LayerSwitcher()); Wicket.omaps['map7'].setPopupId('content8'); ;}); /*-->]]>*/ Any ideas? -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22336109.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
openstreetmap in openlayers
This is my first message to this mailinglist, so first of all: Hello everyone! I want to use wicket together with openlayers in my webapp. Therefore I looked at the openlayers contrib project on wicketstuff, which seems pretty cool. I managed to embed a wms and gmap, but I need to use openstreetmap due to license issues. I am not sure how to do this with the wicketstuff openlayers api. Is there a simple way to realize this, already? When I looked at the api I found an abstract layer class. Should I extend this class to add the openstreetmap layer? -- View this message in context: http://www.nabble.com/openstreetmap-in-openlayers-tp22329429p22329429.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org