How to change position of Zoom and Search widget in 4.11

5176
3
Jump to solution
04-18-2019 11:58 AM
tonyko
by
New Contributor

Is there a way that I can specify the top and left css positions of either of these widgets. It seems as though there was a way in 3.28 but I can't seem to make it work in 4.11. 

I only see the generic positions I can add: "top-trailing", "top-left"

1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

You can use the manual option and provide the position via css. There's an example here: JS Bin - Collaborative JavaScript Debugging 

View solution in original post

3 Replies
BirajaNayak
Esri Contributor

Hi Tony,

You can add UI position as per below:

Possible Values: bottom-leading | bottom-left | bottom-right | bottom-trailing | top-leading | top-left | top-right | top-trailing | manual

Here are the web help links:

https://developers.arcgis.com/javascript/latest/guide/view-ui/

https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add

Example:

view.ui.add(search, "top-right");

Thanks,

Biraja

0 Kudos
tonyko
by
New Contributor

I'm looking for the proper way to position it using pixels. NOT by using the defaults they provide

KellyHutchins
Esri Frequent Contributor

You can use the manual option and provide the position via css. There's an example here: JS Bin - Collaborative JavaScript Debugging