hi, a super simple version of this has been useful to me. just via calling<br>
kaMap.getGeoExtents, then pad that (so it adds ~1/2 length of the viewport on each side) and fetch<br>
all of the markers in that expanded extent. then register for an event of EXTENTS_CHANGED and check<br>
if the new getGeoExtents results fall with the expanded extents. if so, do nothing. otherwise, fetch new markers. <br>
<br>
base, most of the slowness will come from having 500+ images attached
to your div. but you can assign an AJAX (call()) to each div to fetch
the meat of the information instead of sending it with the inital
marker import. if you have the div id correspond to database id, that
keeps it simple. <br>
-brent<br>
<br><div><span class="gmail_quote">On 2/28/06, <b class="gmail_sendername">Stephen Woodbridge</b> <<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Paul Spencer wrote:<br>> Ok, then the event could be triggered as a result of the call to<br>> checkWrap and if any wrapping has occurred you would get an event<br>> indicating the new extents of the meta viewport. You could then make
<br>> your overlay image the size of the meta viewport (in pixels) and pin it<br>> to the top/left image in the meta viewport. When this event is<br>> triggered, you would reposition the image and change its source so it
<br>> would load a new overlay from the server.<br>><br>> Are you going to implement this and contribute?<br><br>Matt has been working on this, but I think he is currently pinning an<br>image just the size of the viewport so we have to request a new one for
<br>every pan. I think the plan is to contribute some of the stuff he has<br>been working on, but I don't know any of the details.<br><br>-Steve<br><br>> Cheers<br>><br>> Paul<br>><br>> On 28-Feb-06, at 9:23 AM, Stephen Woodbridge wrote:
<br>><br>>> Hi Paul,<br>>><br>>> These get called for every tile load request if I understand your<br>>> description, if I pan diagonally then I would expect to get rows<br>>> +cols-1 (or more) events triggered as you add new rows and columns to
<br>>> the meta_viewport.<br>>><br>>> I think this a little too granular, but we might be able to roll up<br>>> these events. What I was thinking about was to consider the<br>>> additional tiles around the viewport as a meta_viewport that has
<br>>> extents. Then when the viewport moves outside the meta_viewport a<br>>> single event is triggered and the new extents of the meta_viewport<br>>> are made available.<br>>><br>>> If it is easy to get this from what you suggested below then that
<br>>> would be great other you might consider add this type of event as I<br>>> think anyone trying to track an overlay with a server side image will<br>>> be able to use this.<br>>><br>>> -Steve
<br>>><br>>> Paul Spencer wrote:<br>>><br>>>> Steve,<br>>>> I think that we should expose two events:<br>>>> KAMAP_TILE_CHANGING<br>>>> KAMAP_TILE_CHANGED<br>>>> this would potentially allow the interface to expose the number of
<br>>>> tiles that are 'in the queue' and could be used for other purposes<br>>>> to, like fixing overlays etc<br>>>> KAMAP_TILE_CHANGING would be triggered in the setTile method of<br>>>> _layer (and affliates).
<br>>>> KAMAP_TILE_CHANGED would be triggered in the kaMap_imgOnLoad function<br>>>> One thing to consider is that images do fail to load for various<br>>>> reasons and we need to be aware of the difference between an image
<br>>>> that is loaded the first time and an image that is loaded because<br>>>> of an error, otherwise tile counts could be seriously impacted.<br>>>> Would this meet your needs?<br>>>> Cheers
<br>>>> Paul<br>>>> On 28-Feb-06, at 7:58 AM, Stephen Woodbridge wrote:<br>>>><br>>>>> This is an excellent question as we have been doing something<br>>>>> similar with router overlays. We currently overlay an image just
<br>>>>> the size of the viewport, but it would make sense to ask for a<br>>>>> larger image say the size of the preloaded tile extents and then<br>>>>> only update that when additional tiles are requested because the
<br>>>>> preloaded tile extent needs to change because of panning or<br>>>>> zooming. Could this be made an ka-map event that can be easily hooked?<br>>>>><br>>>>> -Steve<br>
>>>><br>>>>> Base Bloc wrote:<br>>>>><br>>>>>> Dear all,<br>>>>>> First off I would like to say that ka-map 0.2 is a fantastic<br>>>>>> piece of kit and thanks for all the work that people have put in
<br>>>>>> to this.<br>>>>>> I am currently building an application using 0.2 and I am using<br>>>>>> the addObjectGeo function to add markers along with mouseover<br>>>>>> events (pop-up windows) to the map. All is working as it should
<br>>>>>> and is looking good. My concern now is the number of markers; the<br>>>>>> application is covering most of Southeast Asia and the number of<br>>>>>> markers is going to be high. I am looking to use Ajax to connect
<br>>>>>> to a MySQL database to retrieve the point data relevant to the<br>>>>>> area of the map being viewed, as if all of the points were to be<br>>>>>> retrieved in one go it would result in a serious performance hit
<br>>>>>> for the user.<br>>>>>> I'm no ka-map expert, but I was wondering how ka-map does this<br>>>>>> efficiently with the tiles; as in it gets x number of tiles<br>>>>>> closest to the area being viewed then moves outwards, is there
<br>>>>>> anyway to use the variable(s) that are being sent to the server<br>>>>>> to request the tiles to also query the database and return the<br>>>>>> point data in an equally efficient manor?
<br>>>>>> Thanks in advance for your thoughts.<br>>>>>> Chris<br>>>>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>>>>>> Christopher Brown<br>>>>>> Head of Internet Development
<br>>>>>> Base Bloc Cambodia<br>>>>>> #33, 123, Phnom Penh, Cambodia.<br>>>>>> P.O. Box 2086<br>>>>>> <a href="http://www.basebloc.com">www.basebloc.com</a><br>>>>>> Tel (+885) 12 315 302
<br>>>>>><br>>>>>> -------------------------------------------------------------------<br>>>>>> -- ---<br>>>>>> _______________________________________________<br>
>>>>> ka-Map-users mailing list<br>>>>>> <a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</a><br>>>>>> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">
http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br>>>>><br>>>>><br>>>>><br>>>>> _______________________________________________<br>>>>> ka-Map-users mailing list
<br>>>>> <a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</a><br>>>>> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br>>>><br>>>> +-----------------------------------------------------------------+<br>>>>
|Paul
Spencer
<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a> |<br>>>> +-----------------------------------------------------------------+<br>>>>
|Applications & Software
Development |<br>>>>
|DM Solutions Group
Inc
<a href="http://www.dmsolutions.ca/|">http://www.dmsolutions.ca/|</a><br>>>> +-----------------------------------------------------------------+<br>>><br>>><br>><br>> +-----------------------------------------------------------------+
<br>>
|Paul
Spencer
<a href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</a> |<br>> +-----------------------------------------------------------------+<br>>
|Applications & Software
Development |<br>>
|DM Solutions Group
Inc
<a href="http://www.dmsolutions.ca/|">http://www.dmsolutions.ca/|</a><br>> +-----------------------------------------------------------------+<br>><br>><br>><br>><br>><br><br>_______________________________________________
<br>ka-Map-users mailing list<br><a href="mailto:ka-Map-users@lists.maptools.org">ka-Map-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users">http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br></blockquote></div><br>