Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all articles
Browse latest Browse all 2097

Using AGOL organisational basemaps - Issue in Viewer - Bjorn HELP!

$
0
0
Hi There,

We have discovered an issue in the Flex Viewer - v 3.0.

Basic version - we cannot display webmaps from an AGOL organisational account in the viewer in the basemap gallery - where you have changed the basemap group from the default Esri ones. Can we use our own webmaps from our AGOL account?

Long version
If you want to consume a web map from your AGOL organisational account, if you choose to add arcgisonline basemaps you only get the basemaps from the Esri group - not from any customised basemap groups you may have set. The issue is in protected function portal_loadedHandler(event:PortalEvent):void in PortalBasemapAppender.as where it sets the query to title:"ArcGIS Online Basemaps" AND owner:esri_en and there is no option to set this to your own organisation or groups. If you change this to be your organisation you can get your basemaps (which may or may not be webmaps) back, but then there is an issue with private function createBasemapLayerObject(itemData:Object, item:PortalItem):void - this method creates xml for comparison to add to the basemaps on the map. However it compares the Portal Item title with the basemap in the item title - which may be 2 different things. This means that the nested for loop in private function addBasemapsInOrder():void is never true and the maps don't get added to the basemaps collection; as the portal item title may never be the first basemap title. Now we can change all this by resetting the query and then changing how the layer xml is created, and this will add our organisations basemaps into the viewer. But then this breaks all the AGOL default ones as the control doesn't know how to handle them.

Thanks,
Fraser

Viewing all articles
Browse latest Browse all 2097

Trending Articles