[ka-Map-users] kaXmlOverlay not working..
Chris Tweedie
Chris.Tweedie at dli.wa.gov.au
Sun Feb 5 23:46:54 EST 2006
All good points Steve, and I sympathise with PG with all the problems in
how to actually deploy overlays. (Down here, we like to say that there's
many ways to skin a cat)
I think your method of trying to work with sessions and dynamically
creating a new layer object in the mapfile would become bigger than ben
hur, especially when you have a multi-user environment. The hit
computing the route on every zoom/pan, and also incorporating the layer
as a non-tiled object in kamap would need further customisation.
In an ideal environment the work flow I would see as being ideal would
be
1. User inputs From/To address using mouse / form input in the kamap
window.
2. A php function is called to locate the closest road vertex to the
parameters (eg. nearest graph edge to Point X,Y) and extracts the
necessary edge ID's
3. The function then passes the start/end edge ID through to the DB
retrieval, whereby the pgdjikstra geometry function is called based on
the start/end edge.
4. The geometry output is then passed to the GD rendering of the PNG
output
4. Kamap then positions the image overlay to the necessary location.
There are a few things that need to be ironed out however,
a. How the drawing function tracks the current user extents, cell size
etc. Ideally the image (and relevant calls) should only be made once at
each zoom level, just positioned according to location. This reduces any
overhead recalculating the cords ... this would also need a pseudo
geo2pix function.
b. The line simplification really needs to be looked into. In just a few
examples I used on my roads dataset, a simple route pulled back over a
thousand points ... something which the current setup passing params in
a URL just wont/cant handle. Users should only need this level of detail
at a very small scale ... how this would work though, im yet to figure
out (see blog)
This in my eyes, just seems simpler but please tell me if I am viewing
this in tunnel vision. Look forward to PG's comments :)
Regards,
Chris.
-----Original Message-----
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
**********************
From: Stephen Woodbridge [mailto:woodbri at swoodbridge.com]
Sent: Monday, 6 February 2006 11:37 AM
To: Chris Tweedie
Cc: Pg; ka-map-users at lists.maptools.org
Subject: Re: [ka-Map-users] kaXmlOverlay not working..
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