Locating a point on a web app not in the db

191
7
Jump to solution
10-12-2017 09:12 AM
MarcGrober
New Contributor II

I would like to be able to feed lat and lon to a web app so that scanning a QR code (with the URL of the web app and point coordinates)  will pop up the ESRI web map that is linked to the web app with a point locator (without inserting such points in the ESRI db). That is doable with  Google Maps  though you have to provide BOTH decimal and minute second declarations as part of the URL.

It looks like with ARCGis Online there are two issues. 

  • The first is getting lat and lon for a point in a web map. It appears that this is not yet possible so it may require using some other application and db to first get the coordinates.
  • Second, i the question of how to frame the URL of the web app so the web app displays the point over the selected web map.

I am sure that this has been done thousands of times, but I have been tracking up and down forums and can't seem to wangle this out.

0 Kudos
1 Solution

Accepted Solutions
MarcGrober
New Contributor II

AHA!!!  
The initial problem was that for some reason ESRI requires longitude first and latitude second, so my coordinates were backwards. This now works: https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49&marker=-149.7826;... 
And tweaking for zoom, I finally got:
https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49&level=17&marker=-... 

I just did not get that esri wanted latitude as x
Thanks for all your assistance 🙂

View solution in original post

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Marc,

   Not sure I am completely following but have you seen the WAB URL parameters list and specifically the add point:

http://doc.arcgis.com/en/web-appbuilder/manage-apps/app-url-parameters.htm#ESRI_SECTION1_84F07DECDAE... 

0 Kudos
MarcGrober
New Contributor II

Thank you for the reference, Robert, but I am a bit lost in getting here to there as the products are so complex.
I have taken a map and created a basic webapp (https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49 ).  The URL that results looks nothing like the URLs that are referenced in the documentation, and adding the marker data to the URL does not seem to have any effect whatsoever.  Yes, the webapp I created will let me plot a point, but I can't feed the webapp the point via the URL , and if I share the map after I locate the point, the point is not included.

So, to recap:
I have a map layer that I want to use to be able to show a user where they are. I want to embed the URL to the location on the map in a QR code
I understand I can somehow do that (create a URL displaying the map) by turning the map layer into a webapp
The online interface only allows me to create a webapp using a template, and I did that.
The webapp produced does not seem to allow me to feed markers to it.

I suppose the issue may be as simple as the reference only applies to the desktop export of a webapp to one's own server, and I am trying to serve this from arcgis online (and frankly I have no idea what <your portal URL> is supposed to indicate).

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Marc,

  This works just fine for me:

https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49&marker=-79.234826... 

Notice I just appended &marker=-79.234826;38.147884;;Race%20start%20and%20finish;;Grindstone%20100%20Ultra%20Marathon to your url.

0 Kudos
MarcGrober
New Contributor II

but, you used your coordinates...  using my coordinates:
https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49&marker=61.2031;-1...
I get nothing but the search bar...

So there is something amiss, lol - I did notice that ESRI used a semicolon instead of a comma between the coordinates, but beyond that I am a bit stumped.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Marc,

   Do you not know the lat lon coordinates to the point you want to add? Replacing the coordinates with your own should be not issue at all if you have WGS84 or WebMercator coordinates.

0 Kudos
MarcGrober
New Contributor II

AHA!!!  
The initial problem was that for some reason ESRI requires longitude first and latitude second, so my coordinates were backwards. This now works: https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49&marker=-149.7826;... 
And tweaking for zoom, I finally got:
https://www.arcgis.com/apps/View/index.html?appid=1e5638b1b44a432db249f34288f98b49&level=17&marker=-... 

I just did not get that esri wanted latitude as x
Thanks for all your assistance 🙂

View solution in original post

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Marc,

   Glad you got it figured out. Don't forget to mark this question as answered.

0 Kudos