hi blase, no example on a public server but i just did up an example
without markers. but you can get the idea if you drag around the map,
it will only trigger an alert() from the functoin where you'd redraw
markers if you drag far enough from the extents of the previous redraw.
at:<br>
<a href="http://128.32.253.220/qkaMap/ovl/htdocs/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://128.32.253.220/qkaMap/ovl/htdocs/</a><br>
<br>
with the stuff you're interested in:<br>
<a href="http://128.32.253.220/qkaMap/ovl/htdocs/testExtents.js" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://128.32.253.220/qkaMap/ovl/htdocs/testExtents.js</a><br>
<br>you'll have to look into the kaXMLOverlay.js stuff or just use
addObjectGeo to do your markers, but this gives you the idea how not to
have to refresh markers for every little pan. <br>
i dont think 50 markers should be a problem even if you send in lots of html with them.<br>
-b<br><br><div><span class="gmail_quote">On 2/28/06, <b class="gmail_sendername">Base Bloc</b> <<a href="mailto:chris@basebloc.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chris@basebloc.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;">
Hi Brent,<br><br>This sounds like a good way to do this for me as the number of markers that<br>would be displayed for my application would never be more than 50 within a<br>padded viewport at the required scale.<br><br>
I apologize I haven't yet had the opportunity study the inner workings of
<br>ka-map so am not familiar with all the functions yet; what your suggesting<br>is building a new function that uses an existing function called<br>getGeoExtents to find the extent of the current viewport (which can then be
<br>padded for optimum results) then sending these variables back to the server<br>to query the database via an Ajax call to return the relevant markers. This<br>function will be set in motion if EXTENTS_CHANGED is true?
<br>
<br>Thanks, this sounds like a solid yet simple solution, do you have any<br>working code that you can share with us, or a demo of this in action?<br><br>Thanks,<br><br>Chris<br><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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.basebloc.com
</a><br><a href="mailto:chris@basebloc.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">chris@basebloc.com
</a><br>Tel (+885) 12 315 302<br><br>-----Original Message-----<br>From: <a href="mailto:ka-map-users-bounces@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-map-users-bounces@lists.maptools.org
</a><br>[mailto:<a href="mailto:ka-map-users-bounces@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ka-map-users-bounces@lists.maptools.org</a>] On Behalf Of<br><a href="mailto:ka-map-users-request@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-map-users-request@lists.maptools.org
</a><br>Sent: 01 March 2006 00:00<br>To: <a href="mailto:ka-map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ka-map-users@lists.maptools.org</a><br>Subject: ka-Map-users Digest, Vol 10, Issue 28<br><br>Send ka-Map-users mailing list submissions to<br> <a href="mailto:ka-map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ka-map-users@lists.maptools.org
</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br>or, via email, send a message with subject or body 'help' to
<br> <a href="mailto:ka-map-users-request@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-map-users-request@lists.maptools.org</a><br><br>You can reach the person managing the list at
<br> <a href="mailto:ka-map-users-owner@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ka-map-users-owner@lists.maptools.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of ka-Map-users digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Controlling the number of points using addObjectGeo
<br> (Brent Pedersen)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Tue, 28 Feb 2006 07:48:51 -0800<br>From: "Brent Pedersen" <<a href="mailto:bpederse@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
bpederse@gmail.com</a>><br>Subject: Re: [ka-Map-users] Controlling the number of points using<br> addObjectGeo<br>To: <a href="mailto:ka-map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ka-map-users@lists.maptools.org</a><br>Message-ID:
<br> <<a href="mailto:e183a99d0602280748y7bb7c176k6fbf1f1d42de5599@mail.gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">e183a99d0602280748y7bb7c176k6fbf1f1d42de5599@mail.gmail.com
</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br>
<br>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<br>on each side) and fetch<br>all of the markers in that expanded extent. then register for an event of
<br>EXTENTS_CHANGED and check<br>if the new getGeoExtents results fall with the expanded extents. if so, do<br>nothing. otherwise, fetch new markers.<br><br>base, most of the slowness will come from having 500+ images attached to
<br>your div. but you can assign an AJAX (call()) to each div to fetch the meat<br>of the information instead of sending it with the inital marker import. if<br>you have the div id correspond to database id, that keeps it simple.
<br>-brent<br><br>On 2/28/06, Stephen Woodbridge <<a href="mailto:woodbri@swoodbridge.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">woodbri@swoodbridge.com</a>> wrote:<br>><br>> 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<br>> 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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-Map-users@lists.maptools.org
</a><br>> >>>>> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-Map-users@lists.maptools.org</a><br>> >>>> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br>> >>><br>> >>> +-----------------------------------------------------------------+<br>>
>>> |Paul
Spencer
<a href="mailto:pspencer@dmsolutions.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@dmsolutions.ca</a> |<br>> >>> +-----------------------------------------------------------------+
<br>>
>>> |Applications & Software
Development |<br>>
>>> |DM Solutions Group
Inc
<a href="http://www.dmsolutions.ca/%7C" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.dmsolutions.ca/|</a><br>> >>> +-----------------------------------------------------------------+
<br>> >><br>> >><br>> ><br>> > +-----------------------------------------------------------------+
<br>>
> |Paul
Spencer
<a href="mailto:pspencer@dmsolutions.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">pspencer@dmsolutions.ca</a> |<br>> > +-----------------------------------------------------------------+
<br>>
> |Applications & Software
Development |<br>>
> |DM Solutions Group
Inc
<a href="http://www.dmsolutions.ca/%7C" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-Map-users@lists.maptools.org
</a><br>> <a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br>><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL:<br><a href="http://lists.maptools.org/pipermail/ka-map-users/attachments/20060228/75ba8c" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.maptools.org/pipermail/ka-map-users/attachments/20060228/75ba8c</a><br>17/attachment-0001.html<br><br>------------------------------<br><br>_______________________________________________<br>ka-Map-users mailing list
<br><a href="mailto:ka-Map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ka-Map-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://lists.maptools.org/mailman/listinfo/ka-map-users</a><br>
<br><br>End of ka-Map-users Digest, Vol 10, Issue 28<br>********************************************<br><br><br>_______________________________________________<br>ka-Map-users mailing list<br><a href="mailto:ka-Map-users@lists.maptools.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ka-Map-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/ka-map-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/mailman/listinfo/ka-map-users
</a><br></blockquote></div><br>