Select to view content in your preferred language

Place buttons on Map aligned one below other

969
2
Jump to solution
04-01-2020 01:27 AM
rsharma
Occasional Contributor III

hi i try to align buttons on map one below other on bottom right corner manually, but it do not align automatically for different computer size???

i have read this link UI | ArcGIS API for JavaScript 4.14 

but it do not mention  to place multiple buttons one below other in any corner or bottom right??

Thanks in advance for the help.

0 Kudos
1 Solution

Accepted Solutions
Egge-Jan_Pollé
MVP Regular Contributor

Hi rajni sharma,

For an example with all the buttons aligned one below another in the top left corner, see this map.

The buttons are added to the view.ui like this:

view.ui.add([aboutExpand, searchWidgetExpand, zoom, homeWidget, compass, basemapGalleryExpand, layerListExpand], "top-left");

If you replace the top-left with bottom-right, the buttons will appear in that other corner, but aligned horizontally (instead of vertically).

There is also an option manual. Using manual allows you to place the component in a container where you can position it anywhere using CSS.

HTH,

Egge-Jan

View solution in original post

0 Kudos
2 Replies
Egge-Jan_Pollé
MVP Regular Contributor

Hi rajni sharma,

For an example with all the buttons aligned one below another in the top left corner, see this map.

The buttons are added to the view.ui like this:

view.ui.add([aboutExpand, searchWidgetExpand, zoom, homeWidget, compass, basemapGalleryExpand, layerListExpand], "top-left");

If you replace the top-left with bottom-right, the buttons will appear in that other corner, but aligned horizontally (instead of vertically).

There is also an option manual. Using manual allows you to place the component in a container where you can position it anywhere using CSS.

HTH,

Egge-Jan

0 Kudos
rsharma
Occasional Contributor III

Hi  Egge,

I mean like 3 buttons in bottom right.

2 buttons of zoom horizontally above that button in bottom right and

1 button above it

and i am already doing it manually

0 Kudos