Center Map via URL Parameters

4016
17
Jump to solution
07-17-2015 08:58 AM
JayGeisen
New Contributor III

I'm trying pass coordinates via the URL as shown here: Use URL parameters—Web AppBuilder for ArcGIS | ArcGIS

Nothing seems to happen though. Is this functionality not included in the developer edition? I can get the scale level to work, however. 

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Jay,

   Here is a note on the URL param page:

The url parameter for projection only supports WKID 3857 and 4326. This is a known issue and will be addressed in the next release.

So you have to use lat lon or web mercator coords.

   The apps version is noted in the main config (the only thing is when it says 1.2 that means WAB 1.1).

View solution in original post

17 Replies
JayGeisen
New Contributor III
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jay,

   What version of WAB was that app built with? The center url parameter was not effective until 1.1

JayGeisen
New Contributor III

It was built with 1.1 Robert.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jay,

   Strange. Have you tried using Web Mercator coordinates or WGS84 Lat and Lon? I wonder if it is the splash widget that is interfering.

0 Kudos
JayGeisen
New Contributor III

It doesn't seem to matter which wkid I enter in the url. And I was thinking the same thing about the splash widget, but I removed the splash widget code from config.json and it still didn't work. The strange thing is that the zoom level works, regardless of whether or not the splash is on. Was the zoom level parameter introduced in version 1.1 as well? Is there somewhere in the code where the version is tagged, btw?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jay,

   Here is a note on the URL param page:

The url parameter for projection only supports WKID 3857 and 4326. This is a known issue and will be addressed in the next release.

So you have to use lat lon or web mercator coords.

   The apps version is noted in the main config (the only thing is when it says 1.2 that means WAB 1.1).

JayGeisen
New Contributor III

Robert,

If I understand correctly, then I should be able to recenter my map like you did above, right? 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Correct, if you use wkid 102100 or 3857 (which are the same) or 4326