You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Reinout van Schouwen <re...@gmail.com> on 2009/08/10 14:02:30 UTC

Openlayers, openstreetmap and markers

Hi,

I'm playing around with Wicketstuff Openlayers and I have a few
questions.

1) With a Google map, I can set the Bounds of a map easily. When I try
to do the same with an OpenStreetMap, my Bounds are ignored and I get a
thumbnail of the world map. What could be going on here?

2) I want to show a popup onmouseover instead of onclick. From the
examples I took the PopupMarkerInfoAttributeAppender and changed the
"onClick" attribute to "onmouseover". However, the popup is still only
displaying on click. What am I missing?

3) How is the class org.wicketstuff.openlayers.api.MarkerOptions
supposed to be used? I can't find a reference to it anywhere.

regards,

-- 
Reinout van Schouwen


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


Re: Openlayers, openstreetmap and markers

Posted by nino martinez wael <ni...@gmail.com>.
Hi Reinout

Draggable markers does not seem to be a 2 minute change.. From what I
found it's this that has to be done:

...
Basically, there are 2 fundamental 'classes':

OpenLayers.Control.DragMarker
OpenLayers.Handler.Marker

This is how we add drag control to the markers.::::


map = new OpenLayers.Map('map');
markermanager = new OpenLayers.Layer.Markers(" marker layer ");
var DragControl=new OpenLayers.Control.DragMarker(markermanager);
map.addControl(DragControl);
DragControl.activate();
---

But it should "just" be to add a new control (doing above code).. SO
it's not for specific markers but for all markers.

Do you just want your markers to be draggable or do you also want to
capture drag events?

2009/8/11 Reinout van Schouwen <re...@gmail.com>:
> Hi Nino,
>
> Op maandag 10-08-2009 om 18:06 uur [tijdzone +0200], schreef nino
> martinez wael:
>
>> > 3) How is the class org.wicketstuff.openlayers.api.MarkerOptions
>> > supposed to be used? I can't find a reference to it anywhere.
>> I think it might be legacy from when I did the initial framework, I
>> could'nt find any use for it.. What are you wanting to do?
>
> I'd like my markers to be draggable.
>
> Thanks,
>
> --
> Reinout van Schouwen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Openlayers, openstreetmap and markers

Posted by Reinout van Schouwen <re...@gmail.com>.
Hi Nino,

Op maandag 10-08-2009 om 18:06 uur [tijdzone +0200], schreef nino
martinez wael:

> > 3) How is the class org.wicketstuff.openlayers.api.MarkerOptions
> > supposed to be used? I can't find a reference to it anywhere.
> I think it might be legacy from when I did the initial framework, I
> could'nt find any use for it.. What are you wanting to do?

I'd like my markers to be draggable.

Thanks,

-- 
Reinout van Schouwen


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


Re: Openlayers, openstreetmap and markers

Posted by nino martinez wael <ni...@gmail.com>.
2009/8/10 Reinout van Schouwen <re...@gmail.com>:
> Hi,
>
> I'm playing around with Wicketstuff Openlayers and I have a few
> questions.
>
> 1) With a Google map, I can set the Bounds of a map easily. When I try
> to do the same with an OpenStreetMap, my Bounds are ignored and I get a
> thumbnail of the world map. What could be going on here?
>
> 2) I want to show a popup onmouseover instead of onclick. From the
> examples I took the PopupMarkerInfoAttributeAppender and changed the
> "onClick" attribute to "onmouseover". However, the popup is still only
> displaying on click. What am I missing?
>
> 3) How is the class org.wicketstuff.openlayers.api.MarkerOptions
> supposed to be used? I can't find a reference to it anywhere.
I think it might be legacy from when I did the initial framework, I
could'nt find any use for it.. What are you wanting to do?
>
> regards,
>
> --
> Reinout van Schouwen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Openlayers, openstreetmap and markers

Posted by Frank Tegtmeyer <ft...@fte.to>.
> 1) With a Google map, I can set the Bounds of a map easily. When I try
> to do the same with an OpenStreetMap, my Bounds are ignored and I get a
> thumbnail of the world map. What could be going on here?

There is a tutorial somewhere on the OpenStreetMap Wiki. The 
boundaries have to be computed using some magic (but deterministic) 
values that are given in that example. Unfortunately I cannot find the 
reference now.

Here is a link to an example in German:
http://www.cognitiones.de/doku.php/osm_openlayers_test

It says that the magic number 20037508.34 is related to the conversion 
between tile numbers and coordinates.
Unlike in this example the attribution link should be enabled in the 
display. The OSM-Javascript files provide it already but it has to be 
enabled:
    map.addControl(new OpenLayers.Control.Attribution());

Regards, Frank


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