You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Antony Stubbs <an...@gmail.com> on 2009/02/28 09:49:38 UTC
Re: GMap2 (wicket-contrib-gmap2) and autozoom with
getBoundsZoomLevel
patched - http://wicketstuff.org/jira/browse/WSGMAPP-7
ryantxu wrote:
>
> Strangely I needed to get this to work just yesterday!
>
> I was able to hack it by letting GMap2.java take a list of strings it
> will output at the end of getJSinit()
>
> GLatLngBounds bounds = new GLatLngBounds(sw, ne);
> gmap.appendInitJS( "var xxx = "+bounds.getJSconstructor()+";\n" );
>
> gmap
> .appendInitJS
> ( gmap
> .getJSinvoke
> ( "setZoom( "+gmap.getJSinvoke( "map.getBoundsZoomLevel(xxx)-1 )" ) ) );
>
> kinda hacky, but it works!
>
> ryan
>
>
> On Sep 10, 2008, at 7:08 AM, normanr wrote:
>
>>
>> With we, I meant my colleagues and me. And for us, I think it's
>> enough to
>> calculate a ZoomLevel passed to the map, that all GLatLngs given are
>> visible
>> on this map. So yes it's more like the link you posted Martin.
>>
>> Regards,
>>
>> norman
>>
>> Martin Funk-3 wrote:
>>>
>>> normanr wrote:
>>>> Not right now Martin,
>>>>
>>>> but i think that we'll need to do it. But I can't promise ;(
>>>>
>>> who is it that you mean by 'we'?
>>>
>>> I've been rolling the thoughts about a possible implementation in my
>>> head this afternoon, but didn't get to a reasonable answer yet.
>>> I might not have understood the use case yet. Implementing the
>>> methods
>>> 'getBoundsZoomLevel(bounds) & extend(point)' in a way that the server
>>> could ask for their execution, while being in a request/response
>>> cycle,
>>> and also receive their outcome might be not so easy to implement
>>> nor to
>>> use.
>>>
>>> If the use is closer to what is described in
>>> http://econym.googlepages.com/basic14.htm it might be easier.
>>> Here the server would be enabled to place a call to the map which re
>>> zooms and slips it, so that some given points would show up. Later
>>> on it
>>> would be informed about the border and the zoomlevel of the map.
>>> I think that's easier to implement.
>>>
>>> mf
>>> Btw.: I can't promis anything either ;-)
>>>>
>>>>
>>>> Martin Funk-3 wrote:
>>>>
>>>>> Don't know what bit me there,
>>>>> I have to apologize.
>>>>>
>>>>> You don't happen to have any ideas molded in code on that, do you?
>>>>>
>>>>> mf
>>>>>
>>>>> normanr wrote:
>>>>>
>>>>>> http://wicketstuff.org/jira/browse/WSGMAPP-7 says implemented in
>>>>>> Rev
>>>>>> 3416.
>>>>>> But I don't find anything like that, neither in the HEAD nor the
>>>>>> comment
>>>>>> for REV 3416. Is it gone or has it never been in svn?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Martin Funk-3 wrote:
>>>>>>
>>>>>>
>>>>>>> Hi Marko,
>>>>>>>
>>>>>>> 2008/2/3, Marko Taipale <ma...@iki.fi>:
>>>>>>>
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am about to do a feature to my wicket app containing gmap.
>>>>>>>> There
>>>>>>>> are
>>>>>>>> several markers on the map and the map will autozoom & center
>>>>>>>> according
>>>>>>>> to
>>>>>>>> those marker positions.
>>>>>>>>
>>>>>>>> Now I am wondering if there is upcoming support for
>>>>>>>> getBoundsZoomLevel(bounds) & extend(point)* ?
>>>>>>>>
>>>>>>>>
>>>>>>> There shure is. It already has its own feature request.
>>>>>>> http://wicketstuff.org/jira/browse/WSGMAPP-7
>>>>>>>
>>>>>>> Back to serious:
>>>>>>> I think its a reasonable request, but I can't tell you when
>>>>>>> it'll be
>>>>>>> implemented. If you can come up with some code you feel
>>>>>>> confident with
>>>>>>> you
>>>>>>> are welcome to attach ist to the Issue. Or, if you are really
>>>>>>> confident
>>>>>>> about your code ask for commit access to wicket-stuff.
>>>>>>>
>>>>>>> Thnx,
>>>>>>>
>>>>>>> Martin
>>>>>>>
>>>>>>> Or has anybody already written
>>>>>>>
>>>>>>>
>>>>>>>> an app with such a feature / component and could even pass the
>>>>>>>> code -
>>>>>>>> I'm
>>>>>>>> feeling lazy ;).
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> - Marko
>>>>>>>>
>>>>>>>> *see
>>>>>>>> http://code.google.com/apis/maps/documentation/reference.html#GMap2and
>>>>>>>> example at http://econym.googlepages.com/basic14.htm
>>>>>>>>
>>>>>>>> --
>>>>>>>> View this message in context:
>>>>>>>> http://www.nabble.com/GMap2-%28wicket-contrib-gmap2%29-and-autozoom-with-getBoundsZoomLevel-tp15252786p15252786.html
>>>>>>>> Sent from the Wicket - User 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
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/GMap2-%28wicket-contrib-gmap2%29-and-autozoom-with-getBoundsZoomLevel-tp15252786p19410438.html
>> Sent from the Wicket - User 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
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
-----
___________________________
http://stubbisms.wordpress.com http://stubbisms.wordpress.com
--
View this message in context: http://www.nabble.com/GMap2-%28wicket-contrib-gmap2%29-and-autozoom-with-getBoundsZoomLevel-tp15252786p22259980.html
Sent from the Wicket - User 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