Pass XY Data to Application
Hello,
We have a Geocortex map embedded into another application. Currently, there is a startup workflow that watches for a click event and alerts the coordinates.
My Question: Is there a way to send the XY data to the host application and how?
0
-
You can pass variables into a workflow using arguments. You would setup either a single string argument or latitude and longitude arguments. Then you call the workflow by YOURVIEWERURL&run=YOURWORKFLOW&latitude=40&longitude=-104 0 -
So, let me clarify:
The startup workflow is watching for click events and currently just alerts the lat long data when a user clicks.
Instead of alerting the coordinates, I want to send these coordinates to another application (NOT GEOCORTEX) that the map is currently embeded inside.
So, my question again, is there a way I can send the XY data to this other application?0 -
Depending on how you have the map embedded in your application you might be able to make use of a javascript function that will send the coordinates to the parent application using the window.opener.postMessage() function. In the parent application you would use an eventListener to watch for a 'message' event.
Parent code:window.addEventListener('message',function(e) { updateCoords(e.data); },false);
Child code:window.opener.postMessage(projectedGeoms[0].x + "," + projectedGeoms[0].y, "*");0 -
Odiri. Sorry read your question backwards. Peter is spot on. 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare