replicating Popup in seperate panel

733
4
07-30-2013 10:26 AM
gabrielvazquez
New Contributor
I am attempting to replicate the below ESRI JS site.

https://developers.arcgis.com/en/javascript/jssamples/popup_sidepanel.html

However, we do not have access to the public internet. Everything we develop resides within a classified environment and we must build everything off of our local ESRI JS API and GIS Server. So attempting to replicate the below web map ID is impossible for us

//Create a map based on an ArcGIS Online web map id
arcgisUtils.createMap("0ab0004e243641568713ba968d1c424a", "map",{                infoWindow: popup            }).then(function(response){                window.map = response.map;   initializeSidebar(window.map);            }, function(error){                console.log("Map creation failed: ", dojo.toJson(error));            });


Does ESRI provide an alternate version of this code that demonstrates how to build this same sample without a ArcGIS online web map?  Or can someone point me to any other examples of building a "popup in a seperate panel".
0 Kudos
4 Replies
SteveCole
Frequent Contributor
An ArcGIS Online webmap is kind of like a "short cut" in that it is a map that has been created complete with data layers, and basemap. It's just stored in ArcGIS Online. If you define your map as ESRI has done in that particular example, it saves you some coding. That being said, you're not required to set up your map like that. If you look at many of the other samples, the map is created and defined in a more traditional way:

var map = new esri.Map("map",{
          basemap:"topo",
          center:[-122.45,37.75], //long, lat
          zoom:13,
          sliderStyle:"small"
        });


In this case, all you really need is an external internet connection so that you can display the ESRI basemap. All of your data can safely reside within your network. This example shows you the more traditional way of creating a map and then adding your data layers to the map after the map has been created.
0 Kudos
gabrielvazquez
New Contributor
Steve,
Thanks for the input. I figured as much that the ArcGIS Online webmap was a sort of all in one(map, data, etc) solution. Seems like the ESRI JS API is going in this direction more often where they embed various short cuts to maps, data, etc... I see this especially with add map function (basemap:"topo") you pointed out in your reply. However these shortcuts make it difficult for users like my self who cant use these types of public services. Especially harder for me since im still new to Javascript and this specific API.

I was able to replicate and tailor the popup window example (This example) within our network using our data and its working fine. I've been able to replicate several of the JS Samples, this one is proving a bit more difficult. I guess i'm going to have to simply start from scratch adding my own dedicated map and featurelayer, or use the popup example and hopefully build back in the other code for displaying the popup in a seperate panel.

Thanks for the input.
0 Kudos
SteveCole
Frequent Contributor
Cool. Glad you got something worked out.

Just to be clear, you don't have to specify an ESRI basemap for your map. This example shows how to create a map without a basemap and this thread from the forum talks about using your own tiled map service as a basemap for your map.
0 Kudos
gabrielvazquez
New Contributor
Steve,
Yes, I understand that. No need to define a basemap, or as of 3.3. its not a requirement. Adding a basemap is sort of a process I have have in place with all the JS apps I build.

Thanks,
0 Kudos