[ka-Map-users] kaXmlOverlay not working..
Stephen Woodbridge
woodbri at swoodbridge.com
Sun Feb 5 22:37:28 EST 2006
Hi Chris,
An interesting article, thanks.
The obvious thing that comes to my mind is that you are using pgdjkstra
to compute the route, so why not store the route geometry in a session
table and return a uid to the session. You could then create a mapfile
LAYER or separate mapfile to generate the route overlay, based on the
session uid. Eg: you would just spit out an overlay image of the route.
I would then just request an new image on pan/zoom in ka-map based on
the uid and swap it with the current image. While this would request a
new image on every pan/zoom it would be only the route segments and it
would be very fast and low overhead and scalable in terms of users, size
of route, etc.
You would not want to request an image of the whole route because when
zoomed in to a scale of like 1:2500 in a case the route went from NY to
CA as it would be huge. On the other hand the amount of code to handle
image nXn the view port becomes messy on the client but is certainly
doable and would allow some panning before a new image was requested at
the cost of always asking for more image than you will probably use.
-Steve W.
Chris Tweedie wrote:
> Hey guys, just a headsup that I have done a quick article on my blog at
> http://chris.narx.net which is based on PG's kaXMLOverlay code and my
> previous routing article.
>
> Unfortunately I don't have any time to extend the functionality to the
> level I would of liked, so I hope I've inspired someone to keep working
> on something similar.
>
> Pg, I found a few quirks/problems with the current code (see comments at
> end of article). Hopefully I get some time in the coming weeks to
> suggest/help with some changes.
>
> Enjoy,
>
> Chris
>
> -----Original Message-----
> From: ka-map-users-bounces at lists.maptools.org
> [mailto:ka-map-users-bounces at lists.maptools.org] On Behalf Of Pg
> Sent: Friday, 3 February 2006 4:02 AM
> To: ka-map-users at lists.maptools.org
> Subject: Re: [ka-Map-users] kaXmlOverlay not working..
>
> I've a couple of hints:
>
> 1. The XML is served with no mime type by your web server. It should
> have a mime type "text/xml". Configure your server to associate ".xml"
> files with the correct mime, or, if you generate the XML dynamically,
> use a directive to set the mime type.
> Look at the source code of the script used in my example:
>
> http://sistel.dyndns.info/ka-map/xmlget.php.txt
>
> 2. The map shoul be initialized before the overlay get loaded: i
> usually create the overlay in the KAMAP_MAP_INITIALIZED event handler.
>
> Bye
> - Pg
>
>
> 2006/2/2, harry at politistaten.dk <harry at politistaten.dk>:
>
>>Seems like it - fixed. Only, now it can't load the XML file.
>>
>>"Error: xmlDocument has no properties
>>Source: http://localhost/ka-map/htdocs/kaXmlOverlay.js
>>Line: 160"
>>
>>I also tried the same script that
>>http://sistel.dyndns.info/ka-map/indext.html uses for initializing -
>
> no
>
>>luck.
>>
>>
>>>hi, it looks like you define init(), but never call it. or did i
>
> just miss
>
>>>that?
>>> -b
>>>
>>
>>_______________________________________________
>>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
>
> This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this in error, please notify the author by Return email to the sender. Information in this message not relating to the official business of DLI shall be understood as neither given nor endorsed by it. While every care is taken, it is recommended that you scan any attachments for viruses. DLI liability is limited to re-supplying affected attachments.
>
> **********************
>
> PLEASE NOTE: All dola.wa.gov.au and vgo.wa.gov.au email addresses will soon be decommissioned. These have been replaced by dli.wa.gov.au addresses. Please ensure that your records are updated to reflect this change. Further information can be obtained by contacting our service desk on 92737533 or emailing Servicedesk at dli.wa.gov.au
>
> **********************
>
>
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
More information about the ka-Map-users
mailing list