[ka-Map-users] Displaying ka-map images/interface from remote
server
Paul Spencer
pspencer at dmsolutions.ca
Thu Dec 22 07:48:26 EST 2005
Chris, if I understand your question correctly, I think that what you
want cannot be done without some difficulty. Please read the
following ... if it's not what you are trying to do, please let me know.
I am assuming you have a site at http://some.server/ and your
mapserver is at http://some.other.server/
Due to security restrictions implemented by browsers to prevent cross-
site scripting attacks and other hacks, the javascript security model
prevents XmlHttpRequest from being able to load from sites that are
not within the same domain as the main page. Using iframes (an
alternate mechanism to XmlHttpRequest) results in the same problem.
THe one technique that I have found to work around this is to
dynamically create script tags and insert them into the head of the
page. The script tag can point at a remote server and load
javascript that will be evaluated. Since ka-Map already returns
javascript via the XmlHttpRequest object, it may be possible to
replace the guts of xhr.js with something that does script tag
injection.
I'm not really willing to make this part of ka-Map, but if you can
get it to work, please document it in Lorenzo's wiki :)
Cheers
Paul
On 17-Dec-05, at 1:35 AM, Chris G. Stevens wrote:
> First...great work and the new layout is awesome!!
>
> I'm looking for information on how to display the
> ka-map interface in an existing application while the
> mapserver installation is separate from the main
> webserver (i.e. using fgs on alternate port) or a
> completely separate machine (i.e maps.example.com).
> I've done plenty of reading, but I haven't found the
> answers yet. I'm sure Mapserver is capable of this,
> but I'm probably not searching with the right terms.
> Maybe "wms" or "wfs" is what I should be focusing on??
>
> For clarification, I would like to display the ka-map
> interface within a div inside a Postnuke module that I
> am developing while the map data and mapserver run
> remotely on a different machine entirely. I would
> also need to be able to query the ka-map setup for
> lat/longs on the map from the click, etc...
>
> My current setup is fgs + ka-map cvs (~12/14/2005) on
> FC4. FGS is on 8080 and my system installed apache is
> on 80.
>
> The end goal on this is a flight tracking application,
> but that's a long way off.
>
> Thanks in advance!
> Chris
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> 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