[ka-Map-users] Controlling the number of points using addObjectGeo

Stephen Woodbridge woodbri at swoodbridge.com
Tue Feb 28 09:23:14 EST 2006


Hi Paul,

These get called for every tile load request if I understand your 
description, if I pan diagonally then I would expect to get rows+cols-1 
(or more) events triggered as you add new rows and columns to the 
meta_viewport.

I think this a little too granular, but we might be able to roll up 
these events. What I was thinking about was to consider the additional 
tiles around the viewport as a meta_viewport that has extents. Then when 
the viewport moves outside the meta_viewport a single event is triggered 
and the new extents of the meta_viewport are made available.

If it is easy to get this from what you suggested below then that would 
be great other you might consider add this type of event as I think 
anyone trying to track an overlay with a server side image will be able 
to use this.

-Steve

Paul Spencer wrote:
> Steve,
> 
> I think that we should expose two events:
> 
> KAMAP_TILE_CHANGING
> KAMAP_TILE_CHANGED
> 
> this would potentially allow the interface to expose the number of  
> tiles that are 'in the queue' and could be used for other purposes  to, 
> like fixing overlays etc
> 
> KAMAP_TILE_CHANGING would be triggered in the setTile method of  _layer 
> (and affliates).
> 
> KAMAP_TILE_CHANGED would be triggered in the kaMap_imgOnLoad function
> 
> One thing to consider is that images do fail to load for various  
> reasons and we need to be aware of the difference between an image  that 
> is loaded the first time and an image that is loaded because of  an 
> error, otherwise tile counts could be seriously impacted.
> 
> Would this meet your needs?
> 
> Cheers
> 
> Paul
> 
> On 28-Feb-06, at 7:58 AM, Stephen Woodbridge wrote:
> 
>> This is an excellent question as we have been doing something  similar 
>> with router overlays. We currently overlay an image just  the size of 
>> the viewport, but it would make sense to ask for a  larger image say 
>> the size of the preloaded tile extents and then  only update that when 
>> additional tiles are requested because the  preloaded tile extent 
>> needs to change because of panning or  zooming. Could this be made an 
>> ka-map event that can be easily hooked?
>>
>> -Steve
>>
>> Base Bloc wrote:
>>
>>> Dear all,
>>>  First off I would like to say that ka-map 0.2 is a fantastic  piece 
>>> of kit and thanks for all the work that people have put in  to this.
>>>  I am currently building an application using 0.2 and I am using  the 
>>> addObjectGeo function to add markers along with mouseover  events 
>>> (pop-up windows) to the map. All is working as it should  and is 
>>> looking good. My concern now is the number of markers; the  
>>> application is covering most of Southeast Asia and the number of  
>>> markers is going to be high. I am looking to use Ajax to connect  to 
>>> a MySQL database to retrieve the point data relevant to the  area of 
>>> the map being viewed, as if all of the points were to be  retrieved 
>>> in one go it would result in a serious performance hit  for the user.
>>>  I’m no ka-map expert, but I was wondering how ka-map does this  
>>> efficiently with the tiles; as in it gets x number of tiles  closest 
>>> to the area being viewed then moves outwards, is there  anyway to use 
>>> the variable(s) that are being sent to the server to  request the 
>>> tiles to also query the database and return the point  data in an 
>>> equally efficient manor?
>>>  Thanks in advance for your thoughts.
>>>  Chris
>>>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> Christopher Brown
>>> Head of Internet Development
>>> Base Bloc Cambodia
>>> #33, 123, Phnom Penh, Cambodia.
>>> P.O. Box 2086
>>> www.basebloc.com
>>> Tel (+885) 12 315 302
>>>   
>>> --------------------------------------------------------------------- 
>>> ---
>>> _______________________________________________
>>> ka-Map-users mailing list
>>> ka-Map-users at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/ka-map-users
>>
>>
>> _______________________________________________
>> ka-Map-users mailing list
>> ka-Map-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                           pspencer at dmsolutions.ca   |
> +-----------------------------------------------------------------+
> |Applications & Software Development                              |
> |DM Solutions Group Inc                 http://www.dmsolutions.ca/|
> +-----------------------------------------------------------------+
> 
> 
> 
> 
> 



More information about the ka-Map-users mailing list