Javascript Viewer like the Flex Viewer with S/C

5615
15
Jump to solution
07-21-2015 08:38 AM
TonyCollins
Occasional Contributor

Hi,

Is there a JavaScript version of the Flex Viewer that I can download and run locally and like the Flex version examine how it is built?

I have a large Flex based application (similar idea, but not based on the Flex Viewer) that I need to start to migrate into JavaScript.

Basically I would like to see the best way to structure a ESRI JS API based application, that can support the loading of external Tools/Modules similar to how the Flex Viewer does?

I hope this makes sense?

Thanks for any help

0 Kudos
15 Replies
TimMcGee1
Occasional Contributor III

Thanks Rickey,

I was about to provide a similar explanation. One minor clarification. You do not need to click on the arrow icon to get the pane to undock. That was true in the initial release. Now you can just click and drag the title bar which is a more natural behavior. The icon remains as an indication that the widget can be undocked.

In addition to allowing the sidebar widget to be undocked, there is an older style floating window with `type: 'floating'`, If you click on the 'Help' link in the upper-right corner you'll see a modal non-movable version of this. I expect that the floating widget will evolve to have similar behavior to that of an undocked titlePane widget shown in Rickey's screenshot.

ShaningYu
Frequent Contributor

Dear Tim:

I am working on your wonderful CMV. One thing in beginning is to set up the initial extent. I customized the extent in the viewer.js, HomeButton’s map extent. It works as I click the Home Button. However, I could not find where the initial extent is defined. Could you guide me how? Thanks.

Yours,

Shaning

0 Kudos
TimMcGee1
Occasional Contributor III

Shaning,

You set the initial extent in the `mapOptions` here: cmv-app/viewer.js at master · cmv/cmv-app · GitHub In the example, it uses center and zoom. You can use an extent instead. Anything from the ESRI Map contructor Map | API Reference | ArcGIS API for JavaScript  can be used in the mapOptions.

If you set the mapOptions to the desired initial extent, you can leave it out of the config for the home button as it will use the initial extent.

Side note: we've strayed a bit from the original topic. Additional questions should be created in new posts on GeoNet CMV - Configurable Map Viewer  or the other cmv support channels.

ShaningYu
Frequent Contributor

Perfect!! Got it. Thanks so much!!!

0 Kudos
TonyCollins
Occasional Contributor

Oooooh.

Big smile on my face that you can't see right now. I'm going to have a good play with this then.

Thanks for all your help, I'm sure I'll be back with more questions!

0 Kudos
TimMcGee1
Occasional Contributor III

Tony,

Great!

In addition to the support links I provided in my original post, there is also a GeoNet group CMV - Configurable Map Viewer​ that had been created last year but forgotten about until yesterday. We're monitoring it now. Perhaps too many ways to get help that will be refined as we progress. Too many is better than too few.

0 Kudos