AnsweredAssumed Answered

how to use configuration files with Javascript API?

Question asked by gcooke76 on Jul 14, 2014
Latest reply on Jul 14, 2014 by dwtimmins

I have a fair amount of experience with the Flex APi but am very new to the Javascript API and just getting my head around all the Javascript resources etc... What I would like to do is implement similar functionality to what i had in my Flex API application.

 

I want to develop 1 GIS viewer application in the javascript API that serves my whole companies GIS requirement. We have a bunch of projects that all require some kind of map viewer and asscoiated functionality (find an asset, view history, check out extra information like hazard info, energy usage etc..). I see this as being one application with all functionality delivered in different widgets and with different basemaps loaded based on the user information (ie load basemap for that users region). I figured i could do this by passing URL parameter information when the request to display the map viewer page is made from whichever project requires it and then load up that specific "view" of the Map viewer application.

 

For example: If I am based in London UK and want a GIS viewer for Asset Management, I load up the asset management viewer with a specific set of widgets and specific basemaps.

 

I managed to achieve this in Flex Viewer using URL query string which essentially passed the name of a config.xml file and then simply loaded the application with that config file selected at runtime.

 

Has anyone achieved similar functionality in the JS.api? Can i use xml config files to control which view of my application individual users and projects get?

 

Hope someone can help.

Outcomes