Hi Nino,
>> Looking further into the code one can see that a lot of JavaScript code 
>> fragments are hardcoded Strings in the Java code.
>> This is done for a reason. The project ought to be able to generate the 
>> definitions of the functions that set up the GMap, its Handlers and its 
>> Overlays at runtime. So that when the state of the GMap changes the 
>> needed function definitions are send over net and are triggered by 
>> wicket-ajax onSuccessScript on  the client browser.
>> When I first saw that, being an absolute JavaScript newbie, I thought 
>> its a cool trick and gives one a lot of flexibility. It's not lazy 
>> loading, it's lazy definition. The server can wait till the user clicks 
>> before the function implementing the maps behaviour, has to be defined. 
>> That's sort of neat.
>> The downside of this, is that all this JavaScript code has to be 
>> transfered over the net. And if you look at it its a lot of redundant 
>> looking code, when one Overlay is added the definitions of all the 
>> others is send over the net too. When the server is on localhost this 
>> might not hurt, but I fear that the generated traffic might be too much 
>> for a dsl-line.
>>   
>>     
> This has not caused any problems thinking of latency, there seem to be a 
> limit where adding markers on the fly seem to slow down, that's 
> somewhere around 400-500 markers. However I do agree that we have some 
> redundant code... My idea was to make the stuff work and then clean up 
> afterwards..
>   

other sources
http://mapki.com/wiki/Read_This_First#My_map_loads_slowly_when_there_are_1500_markers
are talking about a limit at about 200 markers, so this 'might' be a 
limit on the google side.

What I meant by the redundant code was the JavaScript that get's shoved 
over the net generating the markers.

Looking at the example you provide: http://turengaartil.dk/tgt/gmap/
with firebug http://www.getfirebug.com/
one can see that the page with all JavaScript maps graphics and 
everything is about 145kb big.

Clicking the hotel check Box an XMLHttpRequest with an URL like this one 
goes over the line:
http://turengaartil.dk/tgt/gmap/?wicket:interface=:11:formFilter:displayHotel:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&wicket:ignoreIfNotActive=true&random=0.7992635059750802
its response is containing the definitions of the Markers it is 142kb big.
The definitions of the markers look very redundant.

Martin

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to