Standard Esri Map Control

Use Marker Actions in a Map

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

In this example, the user clicks on a link from the building marker info window to open a dialog displaying building details in a grid panel.

The event handler is registered to the mouse click event by calling addMarkerAction(), and passing the desired link label and the mouse click event handler:

this.mapControl.addMarkerAction('Show Details', this.showBuildingDetails);

The mouse click event handler returns two parameters. The first is the title that was defined for the marker definition. The second are the attributes that were defined for the marker. (See Show Buildings on a Map .)

In this example, because the information window title is the bl_id, the title can be used to create a restriction for bl_id, which can then be passed on to the dialog:

showBuildingDetails: function(title, attributes) { var bl_id = title; var restriction = {'bl.bl_id': bl_id }; var allowCreateRecord = false; var defaultDialogX = 20; var defaultDialogY = 40; var defaultDialogWidth = 800; var defaultDialogHeight = 600; View.openDialog('ab-arcgis-bl-details-dialog.axvw', restriction, false, 20, 40, 800, 600); }

Sample view: http://localhost:8080/archibus/schema/ab-products/solutions/arcgis/standard/ab-arcgis-bl-marker-action.axvw