Back to Devexpress

GeoPointMapItem Class

dashboard-js-devexpress-dot-dashboard-dot-model-03469c52.md

latest8.6 KB
Original Source

GeoPointMapItem Class

A Geo Point Map dashboard item that allows you to place callouts on the map using geographical coordinates.

Declaration

ts
export class GeoPointMapItem extends GeoPointMapItemBase

Remarks

The Geo Point Map dashboard item allows you to place callouts on the map using geographical coordinates.

See Web Dashboard - Creating Geo Point Maps to learn more about Geo Point Maps.

Example

The following example shows how to create the Geo Point Map dashboard item, bind it to data and add to the existing dashboard.

Create data items (measures and dimensions) and use the DataItem.dataMember property to bind them to the existing data source’s columns. Then use the created measures and dimensions in the dashboard item to bind it to data.

After you add the created dashboard item to the Dashboard.items collection, call the Dashboard.rebuildLayout method to rebuild the dashboard layout and display changes.

javascript
// Use the line below for a modular approach:
// import * as Model from 'devexpress-dashboard/model'
// Use the line below for an approach with global namespaces:
// var Model = DevExpress.Dashboard.Model;

// ...
public createGeoPointMapItem() { 
    // Create data items for the GeoPointMap dashboard item.
    var geoPointMapImport = new Model.Measure();
    geoPointMapImport.dataMember("Import");
    var geoPointMapLatitude = new Model.Dimension();
    geoPointMapLatitude.dataMember("Latitude");
    var geoPointMapLongitude = new Model.Dimension();
    geoPointMapLongitude.dataMember("Longitude");

    // Create the GeoPoint Map dashboard item and bind it to data.
    var geoPointMapItem = new Model.GeoPointMapItem();    
    geoPointMapItem.name('geoPointMap');
    geoPointMapItem.dataSource(excelDataSource.componentName());

    geoPointMapItem.latitude(geoPointMapLatitude);
    geoPointMapItem.longitude(geoPointMapLongitude);
    geoPointMapItem.area("Europe");
    geoPointMapItem.value(geoPointMapImport);    

    control.dashboard().items.push(geoPointMapItem);
    // ...
    control.dashboard().rebuildLayout();
}

Inherited Members

area

colorScheme

coloringOptions

componentName

customProperties

customShapefile

dataItems

dataMember

dataSource

disposed

enableClustering

filterString

formatRules

hiddenDimensions

hiddenMeasures

interactivityOptions

isDisposed

isMasterFilterCrossDataSource

itemType

latitude

lockNavigation

longitude

name

parentContainer

shapeTitleAttributeName

showCaption

tooltipDimensions

tooltipMeasures

viewport

visibleDataFilterString

dispose

getInfo

getUniqueNamePrefix

Inheritance

SerializableModel TypedSerializableModel DashboardItem DataDashboardItem MapItem GeoPointMapItemBase GeoPointMapItem

See Also

Geo Point Maps

constructor

Initializes a new instance of the GeoPointMapItem class.

Declaration

ts
constructor(
    modelJson?: any,
    serializer?: DevExpress.Analytics.Utils.ModelSerializer
)

Parameters

NameTypeDescription
modelJsonany

A JSON object used for dashboard deserialization. Do not pass this parameter directly.

| | serializer | ModelSerializer |

An object used for dashboard deserialization. Do not pass this parameter directly.

|

Properties

value Property

Declaration

ts
value: ko.Observable<DevExpress.Dashboard.Model.Measure>

Property Value

Type
Observable<Measure>