Select to view content in your preferred language

north arrow Web AppBuilder

2154
3
09-15-2016 11:04 PM
AliBarakat
Frequent Contributor

Hello,

is it possible to add a north arrow in WAB?

Tags (1)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Ali,

   It would be if you want to develop some custom widget for this but most people just use a print template that has a North Arrow in the print template as having a north arrow on the screen at all time is a bit overkill because the map is almost always north oriented unless its a 3D scene.

GilbertoMatos
Frequent Contributor

Hello!

I do not know exactly what you need, but I did a simple widget to show a north arrow on the right corner of the map. However, it still does not appear in the print through the "print" widget. As soon as possible, I will work on this.

Attached follows the compressed widget. Drop it in the widgets folder of your application, and add the following code in your config.json file in the root folder of the application, within the "widgetOnScreen" session.


{
                
"Uri": "widgets / NorthArrow / Widget",
                
Position
                
{
                    
"Right": 30,
                    
"Top": 350,
                    
"Width": 100,
                    
"Height": 100,
                    
"Relative": "map"
                
},
                
                
"Version": "2.2",
                
"Id": "widgets_NorthArrow_Widget_01",
                
"PlaceholderIndex": 100,
                
"Name": "NorthArrow",
                
"Label": "North Arrow",
                
"Closeable": false,
                
"OpenAtStart": true
}


I hope I have helped.
Gilberto.

Aneel_Kumar_M
Occasional Contributor

dear Robert,

I want to add or modify the compass code for 2D maps as shown in below script

Aneel_Kumar_M_0-1660035155327.png

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-compass-2d 

Our intention is to provide the rotation of map in our 2D web Maps. Is there already available ready to use widget ? so that i can download and use it in my WAB dev edition?

if possible, where can I set the

view.constraints = { rotationEnabled: true}; "

Aneel_Kumar_M_0-1660036286873.png

 https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#rotation 

please advise and help, thank you,

0 Kudos