Latitude and longitude as URL variables
I have a query service (polygon) from which I could retrieve the coordinates. I tried to pass the coordinates as variables to a google maps URL to open street view at a given location. The link doesn't work and the variables names are passed to the URL instead of their values. Here is the URL:
https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=Latitude+","+Longitude
I'm using Geocortex Workflow Designer 4.3
Thanks for any help to achieve this task
0
-
Can you provide the expression which builds your url? I suspect that the syntax there is your issue. 0 -
Hi Zack,
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000kAhW&feoid=Body&refid=0EMf2000000fzjE"_/_img_
The expressions in the Cast activity are:
Latitude = fsUE.Features(0).Attributes("Latitude")
Longitude = fsUE.Features(0).Attributes("Longitude")
Then I insert the url in a DisplayForm activity
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000kAhW&feoid=Body&refid=0EMf2000000fzjJ" _/_img_
I tried many forms of expression in the URL:
https://www.google.com/maps/@?api=1&map_action=pano&viewpoint="+"Latitude"+","+"Longitude"
https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=Latitude+","+Longitude
https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=Latitude,Longitude
https://www.google.com/maps/@?api=1&map_action=pano&viewpoint=Latitude%2CLongitude
Thanks for your help
Badre0 -
That's the issue. The form inputs that you see here do not take expressions, so you can't get variables into there. You need to use the form's runtime modifications for this, which you'll see as a sequence at the bottom of the form activity in the workflow designer. Build your url and assign it to the form element in here. You can probably find everything that you need in the help document for that activity, which will instruct you on how to modify a form at runtime and provide you with the property that you seek for the L-value of your expression (something like "form.Find(Of Hyperlinkformitem)(itemid).Url" or the like, I'm sure). 0 -
Hi Zack,
I added a button to the form with the value = "https://www.google.com/maps/@?api=1&map_action=pano&viewpoint="
When the user click the button, this value will be passed to the variable strResultUrl as a string
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000kAio&feoid=Body&refid=0EMf2000000fzon"_/_img_
_img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f2000000kAio&feoid=Body&refid=0EMf2000000fzos"_/_img_
Finaly, in the RuntimeModification activity I used the assign actuvity to pass the complete Url to the Uri attribute of the Hyperlink1 item of the form:
form.Find(Of HyperlinkFormItem)("Hyperlink1").Uri= "strResultUrl"+Latitude+","+Longitude
This didn't work. I get an error message that I cannot create an L-value from the given expression.
Thank you again for your help0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer