Select to view content in your preferred language

Scale setting widget

4767
24
11-12-2018 04:39 AM
SimonCrutchley
Occasional Contributor III

Is there a widget in Web App Builder to allow you to set a fixed scale at which a map appears? Ideally you could enter the scale, but if not a pick list would do?

Ta

Simon

Tags (1)
24 Replies
RichBell
Occasional Contributor

The base map is the issue...

Create your own base map with the correct WKID.

Post this base map to your ArcGIS online account, this is now your "itemId:"

Create your scale lodes in the Config. Each click of the mouse moves to a defined LOD

Example:

0 Kudos
RichBell
Occasional Contributor

Here Ya go!

Add this widget to your project.

SimonCrutchley
Occasional Contributor III

Thanks Rich. I'm pretty sure I'll have to talk to someone in the main GIS team to work out just what I'm doing, but I'm sure they'll understand this.

0 Kudos
SimonCrutchley
Occasional Contributor III

Hi folks,

Thanks for all your help. This could technically be seen as a separate question, but since you all seem very knowledgeable in this area I thought I'd ask. The "co-ordinates" widget doesn't seem to be working in so far as there is no running display. I can click on the widget and it will then add a marker for which it gives me the co-ordinates, but I'm used to it just giving a running display as you move the mouse around.

Any ideas why this should be?

Ta

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Simon,

   The coordinate widget will only give a running display if the basemap is in Web mercator (102100) or geographic (4326) spatial references.

0 Kudos
SimonCrutchley
Occasional Contributor III

Hi Robert,

That's strange as it seems to work fine in my other app with British National Grid?

Why is that?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Simon,

   If the basemap is web mercator and you coordinate display is web mercator or geographic then running coordinates will display. If the display coordinate system is not the same as the basemap then the coordinates will have to be re-projected and this can not be done in realtime.

0 Kudos
by Anonymous User
Not applicable

While basemaps have defined LODs with the Esri/Google/Bing system can't they reproject on the fly from the esri server? I did that years ago with a custom JS API app. Although I do remember they looked a little uglier, I think when it reprojected back then, it spit out as a jpeg with low compression. I don't mean the fact that it would resample, which it would do of course to fit the new projection, but I could also tell there were also jpeg artifacts. Nevertheless ability to define absolute scale would be very useful. If it is a map app used for field measurement then having nice, even scales to make maps to measure in the field off of is useful to engineers and other folks. Just a thought. And even before they implement that just showing the absolute scale text, and a note like 1"=100' or 1 inch = 100 feet (US) would be nice to add the WAB scalebar widget. Interesting the coordinates could not reproject in real time that would not seem like too much computation but maybe I'm wrong. I had also noticed that and wished it worked in real time for state plane (my app is 3857 of course, due to my previous experience with compressed basemap tiles); so I project my vector data to 3857 for loading speed.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus
While basemaps have defined LODs with the Esri/Google/Bing system can't they reproject on the fly from the esri server?

No. A basemap is a cached layer and cached means that there are tiles that are in a certain projection based at certain scales, that are generated before hand. There is nothing dynamic about a cached basemap (i.e. nothing can be changed at runtime). If you choose to add the layer as an ArcGISDynamicMapServiceLayer instead of ArcGISTiledMapServiceLayer to a basemap layer then yes you can re-project on the fly but you loose all the advantages of ArcGISTiledMapServiceLayer caches.

0 Kudos
by Anonymous User
Not applicable

Oh yes that is what I meant, they were loaded as dynamic 'map image' layers. And remarkably degraded the dynamic raster looked in comparison the tiled one. Sorry I should indeed have written more clearly - I mean the coordinates can't they be re-projected in real time? Wouldn't seem like that heavy of a lift as a calculation? But I am just guessing there on that. And it's germane because I offer state plane (in dec. degrees and DMS) as well as 3857 to display coordinates in my viewer. I mention all this because I wish the coordinates would also update their display in real time as the cursor moves when in state plane and not just 3857.

0 Kudos