Zum Hauptinhalt gehen

Pass XY Data to Application

Kommentare

4 Kommentare

  • Tom Neer
    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
  • Permanently deleted user
    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
  • Permanently deleted user
    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
  • Tom Neer
    Odiri. Sorry read your question backwards. Peter is spot on.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.