I have to correct myself a little bit. The setCenter method does work! I had
a problem with the coordinates, which were not in the right format. So,
sorry for that.





morbo wrote:
> 
> Hi Nino,
> 
> yes, I would love to contribute to this project. But I'm warning you, I am
> not a very experienced javascript developer. :)
> 
> What I have done so far, was extending the layer class for all osm layers.
> For example I created a OSMMapnik class which contributes
> "http://www.openstreetmap.org/openlayers/OpenStreetMap.js"; to the header
> and the getJSConstructer method returns this: return new
> Constructor("OpenLayers.Layer.OSM.Mapnik").add("'" + getName() +
> "'").toJS();
> 
> As you see, I am using the OSM object. This solution works but I think it
> would be nicer to use the TSM object, as I have done in my first attempt
> (see above). The problem is that the script does not find the
> osm_getTileURL method. I am not sure why. 
> 
> Furthermore I modified the setZoom method so, that it calls
> "zoomTo(zoom)". Thats all.
> 
> Maybe, you could give a brief introduction how the project works. I am not
> sure if I understand all of your code. Especially the role of the
> wicket-openlayers.js file and event handling. 
> 
> richard
> 
> 
> 
> 
> nino martinez wael wrote:
>> 
>> Hi Richard
>> 
>> Im the author behind the openlayers contrib, I checked the code last time
>> somewhere in end if december...
>> 
>> Do you have some patches or further clues on whats not working?
>> 
>> 
>> Im not directly using the openlayers integration currently so patches are
>> very welcome, even co- coders would be nice :)
>> regards Nino
>> 
>> 2009/3/6 morbo <richard.wiesin...@gmail.com>
>> 
>>>
>>> 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:
>>> >>
>>> >> <html>
>>> >>     <head>
>>> >>         <title>Wicket Quickstart Archetype Homepage</title>
>>> >>     <script type="text/javascript"
>>> >>
>>> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
>>> >> <script type="text/javascript"
>>> >>
>>> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
>>> >> <script type="text/javascript"
>>> >>
>>> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
>>> >> <script type="text/javascript"
>>> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
>>> >> wicketAjaxDebugEnable=true;
>>> >> /*-->]]>*/</script>
>>> >>
>>> >> <script type="text/javascript"
>>> >> src="http://openlayers.org/api/OpenLayers.js";></script>
>>> >>
>>> >> <script type="text/javascript"
>>> >>
>>> src="resources/org.wicketstuff.openlayers.OpenLayersMap/wicket-openlayersmap.js"></script>
>>> >> <script type="text/javascript" ><!--/*--><![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;     }      }                              ;});
>>> >> /*-->]]>*/</script>
>>> >>
>>> >> <script type="text/javascript" ><!--/*--><![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)',
>>> >> 'http://tile.openstreetmap.org/', {type: 'png',
>>> >> attribution:  http://www.openstreetmap.org/ 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');
>>> >> ;});
>>> >> /*-->]]>*/</script>
>>> >>
>>> >> </head>
>>> >>     <body>
>>> >>         <br/><br/>
>>> >>         <wicket:panel>
>>> >>                      <div wicket:id="infoWindow" style="display:
>>> none"
>>> id="infoWindow9">
>>> >>
>>> >>                              <div wicket:id="content"
>>> id="content8"><wicket:panel>
>>> >>      <wicket:child/>
>>> >> </wicket:panel></div>
>>> >>                      </div>
>>> >>                      <div wicket:id="map" class="map" style="width:
>>> 100%; height: 100%;"
>>> >> id="map7"></div>
>>> >>              </wicket:panel>
>>> >>
>>> >>     </body>
>>> >> </html>
>>> >>
>>> >>
>>> >> 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

Reply via email to