Select to view content in your preferred language

Collapsing a DIV, then Reopen it?

2556
4
10-29-2015 01:48 PM
IanPeebles
Regular Contributor

Hello Everyone!  I was wondering if anyone has developed an application where you have a DIV that contains a legend, then you have an arrow or button that collapses it within an application?

If so, how can this be done?

Example:

CollapsingDIV.jpg

The result would be more map space:

MapExpandedAfterCollapsingDIV.jpg

Any suggestions?  This will be the first time trying this out.  Thank you.

0 Kudos
4 Replies
RickeyFight
MVP Regular Contributor

Ian,

Like this:

City of Ashland Cemetery

0 Kudos
TracySchloss
Frequent Contributor

I've been looking into bootstrap styling.  This isn't setup as a tool, it's more checking the size of the screen and responding by collapsing the sidebar when the window is too small.  I have an 'everything must work on mobile' mandate.

I started with this:

Citizen Request

0 Kudos
MichaelJenkins
Occasional Contributor III

Nice find Tracy Schloss!   Nice work Tom Wayson.

GISP
0 Kudos
TracySchloss
Frequent Contributor

Bootstrapmap is on ESRI's gitHub,   Bootstrap-map by itself only gets you part of the way, because the examples deal largely with just the map itself and not much on a complete interface.

I've had several instances where I've replaced Map with BootstrapMap, largely because it does a better job of resizing itself automatically, and you don't have to code listeners for that circumstance.  It might be the part of a solution for you, Ian, since once the sidebar is collapsed, you'll need the map to resize to fill out the frame.

I also got ideas from:

http://odoe.net/blog/dojo-bootstrap-with-arcgis-javascript-api/

Dojo Bootstrap Map

Using Bootstrap Map? You Might Not Need jQuery… | Tom Wayson

Esri/responsive-map-js · GitHub