Search results

MapsComponent

Represents Maps Component

<ej-maps></ej-maps>

Properties

allowImageExport

boolean

Enables or disables the export to image functionality in map.

Defaults to false

allowPdfExport

boolean

Enables or disables the export to PDF functionality in map.

Defaults to false

allowPrint

boolean

Enables or disables the print functionality in map.

Defaults to false

annotations

AnnotationModel[]

Sets and gets the options for customizing the annotation of maps.

annotationsModule

Annotations

Sets and gets the module to add annotation elements in maps.

background

string

Sets and gets the background color of the maps container.

Defaults to null

baseLayerIndex

number

Sets and gets the base map index of maps. It provides the option to select which layer to be visible in the maps.

Defaults to 0

border

BorderModel

Sets and gets the options for customizing the color and width of the maps border.

bubbleModule

Bubble

Sets and gets the module to add bubbles in the maps component.

centerPosition

CenterPositionModel

Sets and gets the center position of the maps.

dataLabelModule

DataLabel

Sets and gets the module to add the data-label in the maps component.

description

string

Sets and gets the description for maps.

Defaults to null

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

format

string

Sets and gets the format in which the text in the maps are to be rendered.

Defaults to null

height

string

Sets and gets the height in which the maps is to be rendered.

Defaults to null

highlightModule

Highlight

Sets and gets the module to highlight the element when mouse has hovered on it in maps.

isShapeSelected

boolean

Specifies whether the shape is selected in the maps or not..

layers

LayerSettingsModel[]

Sets and gets the options to customize the layers of the maps.

legendModule

Legend

Sets and gets the module to add the legend in maps.

legendSettings

LegendSettingsModel

Sets and gets the options to customize the legend of the maps.

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

mapsArea

MapsAreaSettingsModel

Sets and gets the options to customize the area around the map.

mapsTooltipModule

MapsTooltip

Sets and gets the module to add the tooltip when mouse has hovered on an element in maps.

margin

MarginModel

Sets and gets the options to customize the margins of the maps.

markerModule

Marker

Sets and get the module to add the marker in the maps component.

Sets and gets the module to add the navigation lines in the maps component.

projectionType

string

Sets and gets the projection type for the maps.

Defaults to Mercator

selectionModule

Selection

Sets and gets the module to select the geometric shapes when clicking in maps.

tabIndex

number

Sets and gets the tab index value for the maps.

Defaults to 1

theme

string

Set and gets the theme supported for the maps.

Defaults to Material

titleSettings

TitleSettingsModel

Sets and gets the title to be displayed for maps.

tooltipDisplayMode

string

Sets and gets the mode in which the tooltip is to be displayed. The tooltip can be rendered on mouse move, click or double clicking on the element on the map.

Defaults to ‘MouseMove’

useGroupingSeparator

boolean

Enables or disables the visibility state of the separator for grouping.

Defaults to false

width

string

Sets and gets the width in which the maps is to be rendered.

Defaults to null

zoomModule

Zoom

Sets and gets the module to add the zooming operations in maps.

zoomSettings

ZoomSettingsModel

Sets and gets the options to customize the zooming operations in maps.

Methods

addLayer

This method is used to add the layers dynamically to the maps.

Parameter Type Description
layer Object Specifies the layer for the maps.

Returns void

addMarker

This method is used to add markers dynamically in the maps. If we provide the index value of the layer in which the marker to be added and the coordinates of the marker as parameters, the marker will be added in the location.

Returns void

destroy

This method disposes the maps component.

Returns void

export

This method handles the export functionality for the maps component.

Parameter Type Description
type string Specifies the type of the exported file.
fileName string Specifies the name of the file with which the rendered maps need to be exported.
orientation (optional) PdfPageOrientation Specifies the orientation of the pdf document in exporting.
allowDownload (optional) boolean Specifies whether to download as a file or get as base64 string for the file

Returns Promise

getGeoLocation

This method is used to get the geo location points.

Parameter Type Description
layerIndex number Specifies the index number of the layer of the map.
location PointerEvent Specifies the location in point format.

Returns GeoPosition

getLocalizedLabel

Gets the localized label by locale keyword.

Returns string

getModuleName

Gets component name

Returns string

getTileGeoLocation

This method is used to get the geo location points when tile maps is rendered in the maps component.

Returns GeoPosition

mapsOnClick

This method is used to perform the operations when a click operation is performed on maps.

Parameter Type Description
e PointerEvent Specifies the pointer event on maps.

Returns void

mapsOnDoubleClick

This method is used to perform operations when performing the double click operation on maps.

Parameter Type Description
e PointerEvent Specifies the pointer event.

Returns void

mouseDownOnMap

This method is used to perform operations when mouse is clicked down on maps.

Parameter Type Description
e PointerEvent Specifies the pointer event on maps.

Returns void

mouseEndOnMap

This method is used to perform operations when mouse click on maps.

Parameter Type Description
e PointerEvent Specifies the pointer event on maps.

Returns boolean

mouseLeaveOnMap

This method is used to perform operations when mouse pointer leave from maps.

Parameter Type Description
e PointerEvent Specifies the pointer event on maps.

Returns void

mouseMoveOnMap

This method is used to perform operations while performing mouse over on maps.

Parameter Type Description
e PointerEvent Specifies the pointer event on maps.

Returns void

onMouseMove

This method is used to perform operations when mouse move event is performed on maps.

Parameter Type Description
e PointerEvent Specifies the pointer event on maps.

Returns boolean

panByDirection

This method is used to perform panning by specifying the direction.

Parameter Type Description
direction string Specifies the direction in which the panning is performed.
mouseLocation (optional) PointerEvent | TouchEvent Specifies the location of the mouse pointer in maps.

Returns void

pointToLatLong

This method is used to convert the point to latitude and longitude in maps.

Parameter Type Description
pageX number Specifies the x value for the page.
pageY number Specifies the y value for the page.

Returns Object

print

This method handles the printing functionality for the maps component.

Parameter Type Description
id (optional) string[] | string | Element Specifies the element to be printed.

Returns void

processResponseJsonData

This method is used to process the JSON data to render the maps.

Parameter Type Description
processType string Specifies the process type in maps.
data (optional) any | string Specifies the data for maps.
layer (optional) LayerSettings Specifies the layer for the maps.
dataType (optional) string Specifies the data type for maps.

Returns void

removeLayer

This method is used to remove a layer from map.

Parameter Type Description
index number Specifies the index number of the layer to be removed.

Returns void

shapeSelection

This method is used to select the geometric shape element in the maps component.

Parameter Type Description
layerIndex number Specifies the index of the layer in maps.
propertyName string | string[] Specifies the property name from the data source.
name string Specifies the name of the shape that is selected.
enable (optional) boolean Specifies the shape selection to be enabled.

Returns void

zoomByPosition

This method is used to zoom the map by specifying the center position.

Parameter Type Description
centerPosition Object Specifies the center position for maps.
zoomFactor number Specifies the zoom factor for maps.

Returns void

zoomToCoordinates

This method is used to zoom the maps component based on the provided coordinates.

Parameter Type Description
minLatitude number Specifies the minimum latitude to be zoomed.
minLongitude number Specifies the minimum latitude to be zoomed.
maxLatitude number Specifies the maximum latitude to be zoomed.
maxLongitude number Specifies the maximum longitude to be zoomed.

Returns void

Events

animationComplete

EmitType<IAnimationCompleteEventArgs>

Triggers after the animation completed in the maps component.

annotationRendering

EmitType<IAnnotationRenderingEventArgs>

Triggers before rendering the annotation in maps.

beforePrint

EmitType<IPrintEventArgs>

Triggers before the print gets started.

bubbleClick

EmitType<IBubbleClickEventArgs>

Triggers when performing the click operation on the bubble element in maps.

bubbleMouseMove

EmitType<IBubbleMoveEventArgs>

Triggers when hovering the mouse on the bubble element in maps.

bubbleRendering

EmitType<IBubbleRenderingEventArgs>

Triggers before the bubble element gets rendered on the map.

click

EmitType<IMouseEventArgs>

Triggers when clicking an element in maps.

dataLabelRendering

EmitType<ILabelRenderingEventArgs>

Triggers before the data-label gets rendered.

doubleClick

EmitType<IMouseEventArgs>

Triggers when performing the double click operation on an element in maps.

itemHighlight

EmitType<ISelectionEventArgs>

Trigger when mouse move on the shape in maps and before the shape gets highlighted.

itemSelection

EmitType<ISelectionEventArgs>

Triggers when clicking the shape on maps and before the selection is applied.

layerRendering

EmitType<ILayerRenderingEventArgs>

Triggers before the maps layer gets rendered.

legendRendering

EmitType<ILegendRenderingEventArgs>

Triggers before the legend gets rendered.

load

EmitType<ILoadEventArgs>

Triggers when the map is on load.

loaded

EmitType<ILoadedEventArgs>

Triggers after the maps gets rendered.

markerClick

EmitType<IMarkerClickEventArgs>

Triggers when clicking on the maps marker element.

markerClusterClick

EmitType<IMarkerClusterClickEventArgs>

Triggers when clicking the marker cluster in maps.

markerClusterMouseMove

EmitType<IMarkerClusterMoveEventArgs>

Triggers when moving the mouse over the marker cluster element in maps.

markerClusterRendering

EmitType<IMarkerClusterRenderingEventArgs>

Triggers before the maps marker cluster gets rendered.

markerMouseMove

EmitType<IMarkerMoveEventArgs>

Triggers when moving the mouse over the marker element in maps.

markerRendering

EmitType<IMarkerRenderingEventArgs>

Triggers before the maps marker gets rendered.

pan

EmitType<IMapPanEventArgs>

Triggers before performing the panning operation.

resize

EmitType<IResizeEventArgs>

Triggers when resizing the maps.

rightClick

EmitType<IMouseEventArgs>

Triggers when performing the right click operation on an element in maps.

shapeHighlight

EmitType<IShapeSelectedEventArgs>

Triggers when mouse move on the shape in maps and before the shape gets highlighted.

shapeRendering

EmitType<IShapeRenderingEventArgs>

Triggers before the maps shape gets rendered.

shapeSelected

EmitType<IShapeSelectedEventArgs>

Triggers when clicking a shape in maps.

tooltipRender

EmitType<ITooltipRenderEventArgs>

Triggers before the maps tooltip gets rendered.

tooltipRenderComplete

EmitType<ITooltipRenderCompleteEventArgs>

Triggers after the maps tooltip gets rendered.

zoom

EmitType<IMapZoomEventArgs>

Triggers before the zoom operations in the maps such as zoom in and zoom out.