Skip to main content

One Click Method for Accessing National Weather Service and lat/long parameters

Comments

15 comments

  • Ryan Cooney

    Hi Sonia,

    Nice!

    The OpenWebPage command cannot invoked directly from a workflow because Silverlight imposes a security restriction that prevents opening a new browser window unless it is "triggered by a user-initiated click on a visible area of the hosting Silverlight plug-in" (http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow.aspx) . In a workflow it is actually a callback from the server that is triggering the new window rather than a user click.

    You could try using the NavigateToUri command. It does basically the same thing but does not have the same security restriction.

    --Ryan

    0
  • Permanently deleted user

    Ryan,

    That sounds like a great idea.  How do I use NavigateToUri in a workflow?

    Sonia

     

    0
  • Permanently deleted user

    OK.  so I started looking at the invokemethod activity, but don't really know how to set it up.

    In workflow there are 3 arguments to set up for the InvokeMethod

    TargetType

    TargetObject

    MethodName

    So I thought maybe Target type would be System.Windows.Browser.HTMLWindow - which I had to add System.Windows.Browser.dll to the Geocortex workflow designer folder - then it shows up in the list of object types.  

    TargetObject - I don't know what that is - maybe its the class of the method

    MethodName - I tried Navigate(systemURI,"_blank","height=300,width=600,top=100,left=100")  where systemURI is system.uri and is set to new URI(http://esri.com)

    If you have any ideas let me know.  

    0
  • Ryan Cooney

    Hi Sonia,

    You can use the NavigateToUri command by adding a Run External Command activity to your workflow. Set the Command Name to "NavigateToUri" and the Command Parameter to your desired URL. This is a client activity so it will run in the viewer and popup a new window.

    The Invoke Method activity allows you to call arbitrary .NET methods but this is a server-side activity. You cannot use it to run code in the client application.

    --Ryan

    0
  • Permanently deleted user

    That was way too easy.  I had checked the documentation for the navigateToUri command and couldn't find it anywhere so I was hesitant to use it in the first place.  It worked very well.   

    I'll post this workflow to the Gallery today.

    Thanks very much,

    Sonia

    0
  • Ryan Cooney

    Hi Sonia,

    We'll make sure that command is included in the viewer documentation for the next release.

    --Ryan

    0
  • Permanently deleted user

    Sonia, I went looking for that command also and had no luck - I did though find it in the Rest Manager!  When you edit the viewer toolbar and say add a button (or edit), the Command field lists the available 'commands' and sure enough - the navigateToURI option is listed!!

    interesting! Think I'll be looking at that list a little closer from now on... although I'm not sure if the complete list would be there??

    cheers

    G

    0
  • Permanently deleted user

    Sonia,

     

    Can you paste the code inside this forum? When I try to donwload I get error's. I'm very interested in the way you Get the coordinates from map. Is it capture geometry?

     

    Erik

    0
  • Permanently deleted user

    Sonia,

    Thank you so much for this. I'm not a Workflow genius, but I'm learning from other people's work. Even I was able to replace the Display Hyperlink activity in your original workflow and add an alert activity to show the coordinates to the user. I added this workflow as an item on the I want to... menu in the HTML5 1.2 viewer and it works great.

    Use case: wildfire responder uses the geolocate button to get the map to zoom in to their approximate location. Turn on the aerial photo, locate more closely the place where the fire is, click the Get Lat/Long tool and click on the map to get the decimal degree coordinates. Call these in to dispatch. Requires cell coverage [and possibly a piece of paper to write the coordinates on while making the call ;-)], but still, very neat.

    Does anyone know if there would be a way to use an activity in Workflow to convert the DD to DMS that I can display, too? I know the math, just wondering if it can be done within workflow. I don't know scripting, but am willing to learn. Is that how you would do it?

    Thanks,

    Heather

    0
  • Permanently deleted user
    Has anyone been able to use the Create a Weather Report tool (from the Code Gallery) in HTML5?  I had it run perfectly in Silverlight but I seem to be struggling with getting it to work in HTML5.

     

    Has anyone gotten it up and running?  Is there soemthing in the workflow that needs changed due to HTML5?

     

    Thanks!

     

    John
    0
  • Permanently deleted user
    Hi John,

     

    The workflow should be the same with the exception of the command used in the RunExternalCommand activity.  You will need to use OpenWebPage instead or NavigateToURI for the CommandName.

     

    I have a working sample, if you want to email me I can forward it to you.

     

    Regards,

     

    Wayne Richard

     

    Latitude Geographics Group Ltd.

     

    Head Office: 300 – 1117 Wharf Street  Victoria, BC Canada V8W 1T7

     

    Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com

     

    Developers of Geocortex web-based mapping software | www.geocortex.com

     

    An Esri Platinum Business Partner
    0
  • Permanently deleted user
    Hi Wayne,

     

    I'm sorry it took me awhile to get back to you on this one.  I switched it to OpenWebPage but the tool doesn't go to the NWS page.  Could you please send me your sample workflow so i can compare to mine?  Thanks!

     

    John
    0
  • Permanently deleted user
    Thanks for all of your assistance Wayne!  The tool is working now.
    0
  • Permanently deleted user
    Hi Wayne.

     

    We have this weather report on our SVL Viewer, too.

     

    I know it has been a couple of years since the HTML5 weather report solution was posted, but does that working sample you have for HTML5 still work with the latest GE/HTML5 viewer versions that are currently available? And if so, could you email me that working sample?

     

    Thank you for your response in advance,

     

    -SJE
    0
  • Permanently deleted user
    Hi Steven,

     

    I no longer have the code but please feel free to open a support case and an analyst will be able to help you out.

     

    Regards,

     

    Wayne Richard

     

    Latitude Geographics Group Ltd.

     

    Head Office: 300 – 1117 Wharf Street  Victoria, BC Canada V8W 1T7

     

    Tel: (250) 381-8130 | Fax: (250) 381-8132 | wrichard@latitudegeo.com 

     

    Developers of Geocortex web-based mapping software | www.geocortex.com

     

    An Esri Platinum Business Partner

     

     
    0

Please sign in to leave a comment.