One Layer, Multiple Maps

Discussion created by beck3905 on Oct 28, 2013
Latest reply on Oct 29, 2013 by zj_zou
I am working on a mobile web app using jQuery Mobile.  I have multiple "pages" in my app, but they are technically all in one html doc.  The main page of my app has a map in it created using a webmap from ArcGIS Online.  Another page in the app also needs to have a map in it and I would like to add a single feature layer from the main map to the second map.

I tried: = new Map(self.mapDiv, {
    basemap : "hybrid",
    logo: false,
    showInfoWindowOnClick : false,
    slider: false

if (self.currentLayer) {;;


Where self refers to the module this function is in.  self.currentLayer is a FeatureLayer object taken directly from the main map.  The above code successfully creates a map on the second page, but no features are visible on the map.

Is it possible to have multiple maps with the same FeatureLayer shown in both?  I'd like both maps to honor the same queries/selections/definition expressions and symbology.