Skip to main content

Map opens to specific location based on URL?

Comments

17 comments

  • Tom Neer
    Lisa create your urls with unique ID, like below. Create a workflow that takes that input parameter and zooms to it. The below link is an example. It runs the FindFacility workflow with a facid = SDWF = SWDF-20160519054059. https://maperture.digitaldataservices.com/gvh/?viewer=cswdif&run=FindFacility&facid=SWDF-20160519054059

     

     
    0
  • Permanently deleted user
    Hi Tom...Any chance you could post your workflow as an example?
    0
  • Permanently deleted user
    Thanks! I'm sure I'll have more questions soon...Stay tuned!
    0
  • Permanently deleted user
    Hi Tom! So I think I'm on the right track...I"ve created my workflow "URLWorkflow" which finds and zooms to a facility based on the input argument, but I get this error...

     

    User-added image

     

    And I believe my URL is correct?

     

    https://phweb.co.kern.ca.us/Html5Viewer/index.html?viewer=safe_diner_viewer&run=URLWorkflow&recordID=FA0010448

     

    I always seem to have problems with my query task in my workflows...Any ideas?
    0
  • Tom Neer
    Top of the workflow, there is a GenerateToken task. You will need to change the URL and enter the username and password for your server.
    0
  • Permanently deleted user
    Are you suplying a token to the query?

     

    Is it a secure service that you are doing the query against?

     

    Regards

     

    Ralph Price
    0
  • Permanently deleted user
    I have the GenerateToken task, and I  believe I have to filled out correctly. Lets say my map service has a username of "ABC" and a password of "123"...Would it look like this with the username and password in quotes?

     

    User-added image

     

    I think there's something wrong with how I have my service secured because when I try to access it from here...

     

    https://phweb.co.kern.ca.us/arcgis/rest/services/EH/Safe_Diner_01/MapServer

     

    I enter the username and password and I get redirected to 'This page can't be displayed'

     

    Thank you guys so  much for your help! Tom...you are becoming a very dear friend of mine!
    0
  • Tom Neer
    Lisa. At the top of the workflow there is a task "GenerateToken". You need to change the Token Service URL to "https://phweb.co.kern.ca.us/arcgis/tokens/generateToken". Put in the "Username" and "Password". This will generate a token and store it in the agsToken variable. Make sure that your QueryTask is using the agsToken (see highlighted below)

     

    https://dl.dropboxusercontent.com/u/695670/Capture.PNG
    0
  • Permanently deleted user
    Had to put this project on hold for a few weeks, but now I"m back and still struggling. So I got the Generate Token activity working, now I'm getting an error in the Buffer Task activity

     

    User-added image

     

    User-added image

     

    And my geometry URL is "https://phweb.co.kern.ca.us/arcgis/rest/services/Utilities/Geometry/GeometryServer"

     

    What am I missing?
    0
  • Permanently deleted user
    Hi Lisa,

     

    Have you tried putting the token variable into the Token field of the Buffer Task?  Assuming the Geometry service is on the same server as your map service, you should be able to use the same token as the one you are using in your query task.

     

    I hope this helps!

     

    Thanks,

     

    Danny
    0
  • Permanently deleted user
    Hi Danny, I'm still getting the Buffer Task error whether the token is there or not...

     

    User-added image

     

       
    0
  • Permanently deleted user
    Hi Lisa,

     

    Typically when you see an error about a required parameter being null or empty, it means that one of your variables is not defined.  I would try putting the variables into alert boxes, and checking their contents (just before the Buffer Task).  I would start with the urlGeometryService variable, and work down from there.

     

    If you find that it's coming up blank, work backwards from that activity and find out where it's being defined from.  From there, you can determine why it's blank.

     

    I hope this helps!

     

    Thanks,

     

    Danny
    0
  • Nico Burgerhart
    Check if fsFacility.Features.Any returns True (then the featureset contains features).

     

    You can also inspect it with fsFacility.ToJson.

     

    https://phweb.co.kern.ca.us/arcgis/rest/services/Utilities/Geometry/GeometryServer is not a secured service, so it is not necessary to use a token here.

     

     
    0
  • Permanently deleted user
    Thank you Nico, I'm a bit of a newbie still so I apologize for the question I'm able to ask...

     

    When you say 'Check if fsFacility.Features.Any returns True' How do I go about checking that?
    0
  • Nico Burgerhart
    Use the following in the Text property of an Alert activity. fsFacility.Features.Any.ToString Place the Alert between Query Task and Buffer Task.
    0
  • Permanently deleted user
    And another way to find out about what features you have is:

     

    fsFacility.Features.Count.ToString

     

    to find out how many features (aka Esri.ArcGIS.Client.Graphic(s)) you have in the FeatureSet

     

    Regards

     

    Ralph
    0
  • Permanently deleted user
    Thank you so much to everyone that commented on this thread! Much appreciated! Thanks to Nico, I realized my features weren't being passed, also needed to set a spatial reference in my Buffer task. Works perfect! THANK YOU AGAIN!
    0

Please sign in to leave a comment.