Standard Esri Map Control

Display Objects from Multiple DataSources on a Map

Technologies > User Interface Add-Ins > Geographic Information System (GIS) Views > Map with Multi-Datasource

This example allows the user to select both properties and buildings on the same map. Because properties and buildings come from two different data sources, a separate marker property is created for each data source. For the "Show Properties" button:

pr_list_onShowProperties: function(rows) {
var prMarkerProperty = new Ab.arcgis.ArcGISMarkerProperty( ... );
prMarkerProperty.setSymbolType('diamond');
this.map.updateDataSourceMarkerPropertyPair('pr_ds', prMarkerProperty);

An equivalent event handler creating a different marker property is set up for the "Show Buildings" button, setting the symbol type to 'circle' for contrast. Note that the marker colors for different data sources are predefined.

The selected row restriction is applied to the marker property before refreshing the map.

...
for (var i = 0; i < selectedRows.length; i++) {
restriction.addClause('property.pr_id', selectedRows[i]['property.pr_id'], "=", "OR");
}
...
prMarkerProperty.setRestriction(restriction);
this.map.refresh();

See Display Objects from a Single DataSource on a Map

Sample view: http://localhost:8080/archibus/schema/ab-products/solutions/arcgismap/ab-arcgis-bl-pr-multi-datasources-map.axvw