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.
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.
dear Robert,
I want to add or modify the compass code for 2D maps as shown in below script
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}; "
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#rotation
please advise and help, thank you,