Esri / calcite-maps

A Bootstrap theme for designing, styling and creating modern map apps.
http://esri.github.io/calcite-maps/samples/index.html
Apache License 2.0
239 stars 173 forks source link

How we can open multiple widgets? #214

Open SyedJamshedAli opened 5 years ago

SyedJamshedAli commented 5 years ago

Right now, only one widget can open at a time. For example when we open Layers widget, and then if client on legend widget icon then legend widget simple replace the layers widget. Please guide me.

alaframboise commented 5 years ago

You can't with default calcite-maps. The panels and menus are designed to collapse/expand 1:1. But you have two choices: 1) add the widget to the map in one of the corners; or2) create a standard bootstrap panel set and control it yourself. You can always use pure bootstrap components in this framework.

SyedJamshedAli commented 5 years ago

Thanks for guidance. Is there any chance that this functionality can be provided in the theme by default. As this is the most effective use case of map related applications. Opening multiple panels are some thing that required in almost all application

acrateau commented 5 years ago

This is the dilemma of any mapping application on a mobile device. How much is enough, how much is too much...?

If you need a wider range of support for user interface such as multiple widgets active at once, you might want to check out the Web AppBuilder Developer Edition.

If you're developing for mobile, Calcite Maps is an excellent (and relatively tiny) library for focused apps utilizing responsive design. If you want to build on the Calcite framework and add your own custom widgets that reside in a container outside of the default panels, it can be done.

SyedJamshedAli commented 5 years ago

@acrateau thanks for your guidance I really appreciate if you can help me out that how we can add our own custom multiple widgets which can be open multiple. Also , is there any way that we can make the panels/widgets drag and dropable.

Please help.

acrateau commented 5 years ago

@SyedJamshedAli
For reference, I found this thread helpful: #126

Some options for multiple custom widgets..

1) group custom widgets in one panel using bootstrap components like Tabs - checkout the SettingsPanel in the Style Explorer example app for how this can be done: https://github.com/Esri/calcite-maps/blob/master/samples/style-explorer/index.html

2) tweak the library so you can manage a set of right-panels and left-panels simultaneously. I haven't tried this, so let me know when you figure it out! extra credit if you figure out how to render multiple panels along with the map in smaller screen sizes.

3) roll your own custom containers for your widgets. I was able to add an attribute table at the bottom of my app by adding dGrid tables inside a bootstrap tab component. You'll need to setup and manage much of the event handling, and how the container is rendered