Class: Map

Map

The central class of the library, to create a map on a container.

new Map(container, options) [source]

var map = new maptalks.Map("map",{
     center:     [180,0],
     zoom:  4,
     baseLayer : new maptalks.TileLayer("base",{
         urlTemplate:'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
         subdomains:['a','b','c']
     }),
     layers : [
         new maptalks.VectorLayer('v', [new maptalks.Marker([180, 0]])
     ]
});
Parameter Type Description
container string | HTMLElement | object The container to create the map on, can be:
1. A HTMLElement container.
2. ID of a HTMLElement container.
3. A canvas compatible container in node, e.g. node-canvas, canvas2svg
options Object construct options
Properties
Parameter Type Default Description
center Array.<Number> | Coordinate initial center of the map.
zoom Number initial zoom of the map.
view opt Object null map's view config, default is using projection EPSG:3857 with resolutions used by google map/osm.
baseLayer opt Layer null base layer that will be set to map initially.
layers opt Array.<Layer> null layers that will be added to map initially.
* * any other option defined in Map.options [description]
Extends:
Mixes From:
Fires:

Members

  • (constant) options

  • Properties:
    Name Type Description
    options Object map's options, options must be updated by config method:
    map.config('zoomAnimation', false);
    Properties
    Name Type Default Description
    centerCross opt Boolean false Display a red cross in the center of map
    clipFullExtent opt Boolean false clip geometries outside map's full extent
    zoomAnimation opt Boolean true enable zooming animation
    zoomAnimationDuration opt Number 330 zoom animation duration.
    zoomBackground opt Boolean true leaves a background after zooming.
    layerZoomAnimation opt Boolean true also animate layers when zooming.
    pointThresholdOfZoomAnimation opt Number 150 threshold of point count to perform zoom animation.
    panAnimation opt Boolean true continue to animate panning when draging or touching ended.
    panAnimationDuration opt Boolean 600 duration of pan animation.
    zoomable opt Boolean true whether to enable map zooming.
    enableInfoWindow opt Boolean true whether to enable infowindow on this map.
    hitDetect opt Boolean true whether to enable hit detecting of layers for cursor style on this map, disable it to improve performance.
    maxZoom opt Number null the maximum zoom the map can be zooming to.
    minZoom opt Number null the minimum zoom the map can be zooming to.
    maxExtent opt Extent null when maxExtent is set, map will be restricted to the give max extent and bouncing back when user trying to pan ouside the extent.
    draggable opt Boolean true disable the map dragging if set to false.
    doublClickZoom opt Boolean true whether to allow map to zoom by double click events.
    scrollWheelZoom opt Boolean true whether to allow map to zoom by scroll wheel events.
    touchZoom opt Boolean true whether to allow map to zoom by touch events.
    autoBorderPanning opt Boolean false whether to pan the map automatically if mouse moves on the border of the map
    geometryEvents opt Boolean true enable/disable firing geometry events
    control opt Boolean true whether allow map to add controls.
    attributionControl opt Boolean | Object false display the attribution control on the map if set to true or a object as the control construct option.
    zoomControl opt Boolean | Object false display the zoom control on the map if set to true or a object as the control construct option.
    scaleControl opt Boolean | Object false display the scale control on the map if set to true or a object as the control construct option.
    overviewControl opt Boolean | Object false display the overview control on the map if set to true or a object as the control construct option.
    renderer opt String canvas renderer type. Don't change it if you are not sure about it. About renderer, see TODO.
    Source:

  • (constant) JSON_VERSION

  • Properties:
    Type Description
    String Version of the JSON schema.
    Source:

    Static Methods

  • (protected, static) addOnLoadHook(fn) [source]

  • Add hooks for additional codes when map's loading complete, useful for plugin developping.
    Parameter Type Description
    fn function
    Returns:
    Map:
  • (static) fromJSON(container, mapJSON, optionsopt) [source]

  • Reproduce a map from map's profile JSON.
    var map = Map.fromJSON('map', mapProfile);
    Parameter Type Default Description
    container string | HTMLElement | object The container to create the map on, can be:
    1. A HTMLElement container.
    2. ID of a HTMLElement container.
    3. A canvas compatible container in node, e.g. node-canvas, canvas2svg
    mapJSON Object map's profile JSON
    options opt Object null options
    Properties
    Parameter Type Default Description
    baseLayer opt Object null whether to import the baseLayer
    layers opt Object null whether to import the layers
    Returns:
    Map:

    Methods

  • isLoaded() [source]

  • Whether the map is loaded or not.
    Returns:
    Boolean:
  • (protected) isCanvasRender() [source]

  • Whether the map is rendered by canvas
    var isCanvas = map.isCanvasRender();
    Returns:
    Boolean:
  • getView() [source]

  • Get the view of the Map.
    Returns:
    View: map's view
  • setView(view) [source]

  • Change the view of the map.
    A view is a series of settings to decide the map presentation:
    1. the projection.
    2. zoom levels and resolutions.
    3. full extent.
    There are some predefined views, and surely you can define a custom one..
    View can also be set by map.config('view', view);
    map.setView({
                projection:'EPSG:4326',
                resolutions: (function() {
                    var resolutions = [];
                    for (var i=0; i < 19; i++) {
                        resolutions[i] = 180/(Math.pow(2, i)*128);
                    }
                    return resolutions;
                })()
            });
    Parameter Type Description
    view View view settings
    Fires:
    Returns:
    Map: this
  • getProjection() [source]

  • Get the projection of the map.
    Projection is an algorithm for map projection, e.g. well-known Mercator Projection
    A projection must have 2 methods:
    1. project(coordinate) - project the input coordinate
    2. unproject(coordinate) - unproject the input coordinate
    Projection also contains measuring method usually extended from a measurer:
    1. measureLength(coord1, coord2) - compute length between 2 coordinates.
    2. measureArea(coords[]) - compute area of the input coordinates.
    3. locate(coord, distx, disty) - compute the coordinate from the coord with xdist on axis x and ydist on axis y.
    Returns:
    Object:
  • getFullExtent() [source]

  • Get map's full extent, which is defined in map's view.
    eg: {'left': -180, 'right' : 180, 'top' : 90, 'bottom' : -90}
    Returns:
    Extent:
  • setCursor(cursor) [source]

  • Set map's cursor style, cursor style is same with CSS.
    map.setCursor('url(cursor.png) 4 12, auto');
    Parameter Type Description
    cursor String cursor style
    Returns:
    Map: this
  • getCenter() [source]

  • Get center of the map.
    Returns:
    Coordinate:
  • setCenter(center) [source]

  • Set a new center to the map.
    Parameter Type Description
    center Coordinate
    Returns:
    Map: this
  • getSize() [source]

  • Get map's size (width and height) in pixel.
    Returns:
    Size:
  • getContainerExtent() [source]

  • Get container extent of the map
    Returns:
    PointExtent:
  • getExtent() [source]

  • Get the geographical extent of map's current view extent.
    Returns:
    Extent:
  • getProjExtent() [source]

  • Get the projected geographical extent of map's current view extent.
    Returns:
    Extent:
  • getMaxExtent() [source]

  • Get the max extent that the map is restricted to.
    Returns:
    Extent:
  • setMaxExtent(extent) [source]

  • Sets the max extent that the map is restricted to.
    map.setMaxExtent(map.getExtent());
    Parameter Type Description
    extent Extent
    Returns:
    Map: this
  • getZoom() [source]

  • Get map's current zoom.
    Returns:
    Number:
  • getZoomForScale(scale, fromZoom) [source]

  • Caculate the target zoom if scaling from "fromZoom" by "scale"
    Parameter Type Description
    scale Number
    fromZoom Number
    Returns:
    Number: zoom fit for scale starting from fromZoom
  • setZoom(zoom) [source]

  • Sets zoom of the map
    Parameter Type Description
    zoom Number
    Returns:
    Map: this
  • getMaxZoom() [source]

  • Get the max zoom that the map can be zoom to.
    Returns:
    Number:
  • setMaxZoom(maxZoom) [source]

  • Sets the max zoom that the map can be zoom to.
    Parameter Type Description
    maxZoom Number
    Returns:
    Map: this
  • getMinZoom() [source]

  • Get the min zoom that the map can be zoom to.
    Returns:
    Number:
  • setMinZoom(minZoom) [source]

  • Sets the min zoom that the map can be zoom to.
    Parameter Type Description
    minZoom Number
    Returns:
    Map: this
  • zoomIn() [source]

  • zoom in
    Returns:
    Map: this
  • zoomOut() [source]

  • zoom out
    Returns:
    Map: this
  • setCenterAndZoom(center, zoom) [source]

  • Sets the center and zoom at the same time.
    Parameter Type Description
    center Coordinate
    zoom Number
    Returns:
    Map: this
  • getFitZoom(extent) [source]

  • Caculate the zoom level that contains the given extent with the maximum zoom level possible.
    Parameter Type Description
    extent Extent
    Returns:
    Number: zoom fit for the extent
  • getResolution(zoom) [source]

  • Get map's resolution
    Parameter Type Description
    zoom Number zoom or current zoom if not given
    Returns:
    Number: resolution
  • getScale(zoom) [source]

  • Get scale of resolutions from zoom to max zoom
    Parameter Type Description
    zoom Number zoom or current zoom if not given
    Returns:
    Number: scale
  • fitExtent(extent, zoomOffset) [source]

  • Set the map to be fit for the given extent with the max zoom level possible.
    Parameter Type Description
    extent Extent extent
    zoomOffset Number zoom offset
    Returns:
    Map: - this
  • getBaseLayer() [source]

  • Get the base layer of the map.
    Returns:
    Layer:
  • setBaseLayer(baseLayer) [source]

  • Sets a new base layer to the map.
    Some events will be thrown such as baselayerchangestart, baselayerload, baselayerchangeend.
    Parameter Type Description
    baseLayer Layer new base layer
    Fires:
    Returns:
    Map: this
  • removeBaseLayer() [source]

  • Remove the base layer from the map
    Fires:
    Returns:
    Map: this
  • getLayers(filteropt) [source]

  • Get the layers of the map, except base layer (which should be by getBaseLayer).
    A filter function can be given to filter layers, e.g. exclude all the VectorLayers.
    var vectorLayers = map.getLayers(function (layer) {
        return (layer instanceof VectorLayer);
    });
    Parameter Type Description
    filter opt function a filter function of layers, return false to exclude the given layer.
    Returns:
    Array.<Layer>:
  • getLayer(id) [source]

  • Get the layer with the given id.
    Parameter Type Description
    id String layer id
    Returns:
    Layer:
  • addLayer(layer) [source]

  • Add a new layer on the top of the map.
    Parameter Type Description
    layer Layer | Array.<Layer> one or more layers to add
    Fires:
    Returns:
    Map: this
  • removeLayer(layer) [source]

  • Remove a layer from the map
    Parameter Type Description
    layer String | Array.<String> | Layer | Array.<Layer> one or more layers or layer ids
    Fires:
    Returns:
    Map: this
  • sortLayers(layers) [source]

  • Sort layers according to the order provided, the last will be on the top.
    map.addLayer([layer1, layer2, layer3]);
    map.sortLayers([layer2, layer3, layer1]);
    map.sortLayers(['3', '2', '1']); // sort by layer ids.
    Parameter Type Description
    layers Array.<string> | Array.<Layer> layers or layer ids to sort
    Returns:
    Map: this
  • toDataURL(optionsopt) [source]

  • Exports image from the map's canvas.
    Parameter Type Description
    options opt Object options
    Properties
    Parameter Type Default Description
    mimeType opt String image/png mime type of the image
    save opt Boolean false whether pop a file save dialog to save the export image.
    filename opt String export specify the file name, if options.save is true.
    Returns:
    String: image of base64 format.
  • coordinateToPoint(coordinate, zoomopt) [source]

  • Converts a coordinate to the 2D point in current zoom or in the specific zoom.
    The 2D point's coordinate system's origin is the same with map's origin.
    var point = map.coordinateToPoint(new Coordinate(121.3, 29.1));
    Parameter Type Description
    coordinate Coordinate coordinate
    zoom opt Number zoom level
    Returns:
    Point: 2D point
  • pointToCoordinate(point, zoom) [source]

  • Converts a 2D point in current zoom or a specific zoom to a coordinate.
    var coord = map.pointToCoordinate(new Point(4E6, 3E4));
    Parameter Type Description
    point Point 2D point
    zoom Number zoom level
    Returns:
    Coordinate: coordinate
  • coordinateToViewPoint(coordinate) [source]

  • Converts a geographical coordinate to view point.
    A view point is a point relative to map's mapPlatform panel's position.
    Parameter Type Description
    coordinate Coordinate
    Returns:
    Point:
  • viewPointToCoordinate(viewPoint) [source]

  • Converts a view point to the geographical coordinate.
    Parameter Type Description
    viewPoint Point
    Returns:
    Coordinate:
  • coordinateToContainerPoint(coordinate) [source]

  • Convert a geographical coordinate to the container point.
    A container point is a point relative to map container's top-left corner.
    Parameter Type Description
    coordinate Coordinate
    Returns:
    Point:
  • containerPointToCoordinate(containerPoint) [source]

  • Converts a container point to geographical coordinate.
    Parameter Type Description
    containerPoint Point
    Returns:
    Coordinate:
  • containerPointToViewPoint(containerPoint) [source]

  • Converts a container point to the view point.
    Parameter Type Description
    containerPoint Point
    Returns:
    Point:
  • viewPointToContainerPoint(viewPoint) [source]

  • Converts a view point to the container point.
    Parameter Type Description
    viewPoint Point
    Returns:
    Point:
  • containerToExtent(containerExtent) [source]

  • Converts a container point extent to the geographic extent.
    Parameter Type Description
    containerExtent PointExtent containeproints extent
    Returns:
    Extent: geographic extent
  • checkSize() [source]

  • Checks if the map container size changed and updates the map if so.
    Fires:
    Returns:
    Map: this
  • distanceToPixel(xDist, yDist) [source]

  • Converts geographical distances to the pixel length.
    The value varis with difference zoom level.
    Parameter Type Description
    xDist Number distance on X axis.
    yDist Number distance on Y axis.
    Returns:
    Size: result.width: pixel length on X axis; result.height: pixel length on Y axis
  • pixelToDistance(width, height) [source]

  • Converts pixel size to geographical distance.
    Parameter Type Description
    width Number pixel width
    height Number pixel height
    Returns:
    Number: distance - Geographical distance
  • locate(coordinate, dx, dy) [source]

  • Computes the coordinate from the given coordinate with xdist on axis x and ydist on axis y.
    Parameter Type Description
    coordinate Coordinate source coordinate
    dx Number distance on X axis from the source coordinate
    dy Number distance on Y axis from the source coordinate
    Returns:
    Coordinate: Result coordinate
  • getMainPanel() [source]

  • Return map's main panel
    Returns:
    HTMLElement:
  • getPanels() [source]

  • Returns map panels.
    Returns:
    Object:
  • (protected) _pointToExtent(extent2D) [source]

  • Converts a view point extent to the geographic extent.
    Parameter Type Description
    extent2D PointExtent view points extent
    Returns:
    Extent: geographic extent
  • offsetPlatform() [source]

  • Gets map platform panel's current view point.
    Returns:
    Point:
  • panTo(coordinate, optionsopt) [source]

  • Pan to the given coordinate
    Parameter Type Default Description
    coordinate Coordinate coordinate to pan to
    options opt Object null pan options
    Properties
    Parameter Type Default Description
    animation opt Boolean null whether pan with animation
    duration opt Boolean 600 pan animation duration
    Returns:
    Map: this
  • panBy(point, optionsopt) [source]

  • Pan the map by the give point
    Parameter Type Default Description
    point Point distance to pan, in pixel
    options opt Object null pan options
    Properties
    Parameter Type Default Description
    animation opt Boolean null whether pan with animation
    duration opt Boolean 600 pan animation duration
    Returns:
    Map: this
  • computeLength(coord1, coord2) [source]

  • Caculate distance of two coordinates.
    var distance = map.computeLength([0, 0], [0, 20]);
    Parameter Type Description
    coord1 Array.<Number> | Coordinate coordinate 1
    coord2 Array.<Number> | Coordinate coordinate 2
    Returns:
    Number: distance, unit is meter
  • computeGeometryLength(geometry) [source]

  • Caculate a geometry's length.
    Parameter Type Description
    geometry Geometry geometry to caculate
    Returns:
    Number: length, unit is meter
  • computeGeometryArea(geometry) [source]

  • Caculate a geometry's area.
    Parameter Type Description
    geometry Geometry geometry to caculate
    Returns:
    Number: area, unit is sq.meter
  • identify(opts, callback) [source]

  • Identify the geometries on the given coordinate.
    map.identify({
         coordinate: [0, 0],
         layers: [layer]
     },
     geos => {
         console.log(geos);
     });
    Parameter Type Description
    opts Object the identify options
    Properties
    Parameter Type Default Description
    coordinate Coordinate coordinate to identify
    layers Object the layers to perform identify on.
    filter opt function null filter function of the result geometries, return false to exclude.
    count opt Number null limit of the result count.
    includeInternals opt Boolean false whether to identify internal layers.
    includeInvisible opt Boolean false whether to identify invisible layers.
    callback function the callback function using the result geometries as the parameter.
    Returns:
    Map: this
  • requestFullScreen() [source]

  • Request for the full screen
    Returns:
    Map: this
  • cancelFullScreen() [source]

  • Cancel full screen
    Returns:
    Map: this
  • toJSON(optionsopt) [source]

  • Export the map's json, a snapshot of the map in JSON format.
    It can be used to reproduce the instance by fromJSON method
    Parameter Type Default Description
    options opt Object null export options
    Properties
    Parameter Type Default Description
    baseLayer opt Boolean | Object null whether to export base layer's JSON, if yes, it will be used as layer's toJSON options.
    clipExtent opt Boolean | Extent null if set with an extent instance, only the geometries intersectes with the extent will be exported. If set to true, map's current extent will be used.
    layers opt Boolean | Object | Array.<Object> null whether to export other layers' JSON, if yes, it will be used as layer's toJSON options. It can also be an array of layer export options with a "id" attribute to filter the layers to export.
    Returns:
    Object: layer's JSON
  • addControl(control) [source]

  • Add a control on the map.
    Parameter Type Description
    control control.Control contorl to add
    Returns:
    Map: this
  • removeControl(control) [source]

  • Remove a control from the map.
    Parameter Type Description
    control control.Control control to remove
    Returns:
    Map: this
  • (mixin) on(eventsOn, handler, contextopt) [source]

  • Register a handler function to be called whenever this event is fired.
    foo.on('mousedown mousemove mouseup', onMouseEvent, foo);
    Parameter Type Default Description
    eventsOn String event types to register, seperated by space if more than one.
    handler function handler function to be called
    context opt Object null the context of the handler
    Mixes From:
    Returns:
    Any: this
  • (mixin) addEventListener(eventTypes, handler, contextopt) [source]

  • Alias for on
    Parameter Type Default Description
    eventTypes String event types to register, seperated by space if more than one.
    handler function handler function to be called
    context opt Object null the context of the handler
    Mixes From:
    Returns:
    : this
  • (mixin) once(eventTypes, handler, contextopt) [source]

  • Same as on, except the listener will only get fired once and then removed.
    foo.once('mousedown mousemove mouseup', onMouseEvent, foo);
    Parameter Type Default Description
    eventTypes String event types to register, seperated by space if more than one.
    handler function listener handler
    context opt Object null the context of the handler
    Mixes From:
    Returns:
    : this
  • (mixin) off(eventsOff, handler, contextopt) [source]

  • Unregister the event handler for the specified event types.
    foo.off('mousedown mousemove mouseup', onMouseEvent, foo);
    Parameter Type Default Description
    eventsOff String event types to unregister, seperated by space if more than one.
    handler function listener handler
    context opt Object null the context of the handler
    Mixes From:
    Returns:
    : this
  • (mixin) removeEventListener(eventTypes, handler, contextopt) [source]

  • Alias for off
    Parameter Type Default Description
    eventTypes String event types to unregister, seperated by space if more than one.
    handler function listener handler
    context opt Object null the context of the handler
    Mixes From:
    Returns:
    : this
  • (mixin) listens(eventType, hanlderopt, contextopt) [source]

  • Returns listener's count registered for the event type.
    Parameter Type Default Description
    eventType String an event type
    hanlder opt function null listener function
    context opt Object null the context of the handler
    Mixes From:
    Returns:
    Number:
  • (mixin) copyEventListeners(target) [source]

  • Copy all the event listener to the target object
    Parameter Type Description
    target Object target object to copy to.
    Mixes From:
    Returns:
    : this
  • (mixin) fire(eventType, param) [source]

  • Fire an event, causing all handlers for that event name to run.
    Parameter Type Description
    eventType String an event type to fire
    param Object parameters for the listener function.
    Mixes From:
    Returns:
    : this
  • (mixin) setMenu(options) [source]

  • Set a context menu
    foo.setMenu({
     'width'  : 160,
     'custom' : false,
     'items' : [
         //return false to prevent event propagation
        {'item': 'Query', 'click': function() {alert('Query Clicked!'); return false;}},
        '-',
        {'item': 'Edit', 'click': function() {alert('Edit Clicked!')}},
        {'item': 'About', 'click': function() {alert('About Clicked!')}}
       ]
    });
    Parameter Type Description
    options Object menu options
    Mixes From:
    Returns:
    *: this
  • (mixin) openMenu(coordinateopt) [source]

  • Open the context menu, default on the center of the geometry or map.
    Parameter Type Default Description
    coordinate opt Coordinate null coordinate to open the context menu
    Mixes From:
    Returns:
    *: this
  • (mixin) setMenuItems(items) [source]

  • Set menu items to the context menu
    Parameter Type Description
    items Array.<Object> menu items
    Mixes From:
    Returns:
    *: this
  • (mixin) getMenuItems() [source]

  • Get the context menu items
    Mixes From:
    Returns:
    Array.<Object>:
  • (mixin) closeMenu() [source]

  • Close the contexnt menu
    Mixes From:
    Returns:
    *: this
  • (mixin) removeMenu() [source]

  • Remove the context menu
    Mixes From:
    Returns:
    *: this
  • (mixin) registerRenderer(name, clazz) [source]

  • Register a renderer class with the given name.
    Parameter Type Description
    name String renderer's register key
    clazz function renderer's class, a function (not necessarily a Class).
    Mixes From:
    Returns:
    *: this
  • (mixin) getRendererClass(name) [source]

  • Get the registered renderer class by the given name
    Parameter Type Description
    name String renderer's register key
    Mixes From:
    Returns:
    function: renderer's class
  • (inherited) callInitHooks() [source]

  • Visit and call all the init hooks defined on Class and its parents.
    Inherited From:
    Returns:
    Class: this
  • (inherited) setOptions(options) [source]

  • Merges options with the default options of the object.
    Parameter Type Description
    options Object options to set
    Inherited From:
    Returns:
    Class: this
  • (inherited) config(conf) [source]

  • 1. Return object's options if no parameter is provided.
    2. update an option and enable/disable the handler if a handler with the same name existed.
    // Get marker's options;
    var options = marker.config();
    // Set map's option "draggable" to false and disable map's draggable handler.
    map.config('draggable', false);
    // You can update more than one options like this:
    map.config({
        'scrollWheelZoom' : false,
        'doubleClickZoom' : false
    });
    Parameter Type Description
    conf Object config to update
    Inherited From:
    Returns:
    Class: this

    Events

  • viewchange [source]

  • viewchange event, fired when map's view is updated.
    Properties:
    Name Type Description
    type String viewchange
    target Map map
    old Map the old view
    new Map the new view changed to
    Source:

  • baselayerchangestart [source]

  • baselayerchangestart event, fired when base layer is changed.
    Properties:
    Name Type Description
    type String baselayerchangestart
    target Map map
    Source:

  • baselayerchangeend [source]

  • baselayerchangeend event, fired when base layer is changed.
    Properties:
    Name Type Description
    type String baselayerchangeend
    target Map map
    Source:

  • setbaselayer [source]

  • setbaselayer event, fired when base layer is set.
    Properties:
    Name Type Description
    type String setbaselayer
    target Map map
    Source:

  • baselayerload [source]

  • baselayerload event, fired when base layer is loaded.
    Properties:
    Name Type Description
    type String baselayerload
    target Map map
    Source:

  • baselayerremove [source]

  • baselayerremove event, fired when base layer is removed.
    Properties:
    Name Type Description
    type String baselayerremove
    target Map map
    Source:

  • addlayer [source]

  • addlayer event, fired when adding layers.
    Properties:
    Name Type Description
    type String addlayer
    target Map map
    layers Array.<Layer> layers to add
    Source:

  • removelayer [source]

  • removelayer event, fired when removing layers.
    Properties:
    Name Type Description
    type String removelayer
    target Map map
    layers Array.<Layer> layers to remove
    Source:

  • resize [source]

  • resize event when map container's size changes
    Properties:
    Name Type Description
    type String resize
    target Map map fires the event
    Source:

  • movestart [source]

  • movestart event
    Properties:
    Name Type Description
    type String movestart
    target Map map fires the event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • moving [source]

  • moving event
    Properties:
    Name Type Description
    type String moving
    target Map map fires the event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • moveend [source]

  • moveend event
    Properties:
    Name Type Description
    type String moveend
    target Map map fires the event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • load [source]

  • load event, fired when the map completes loading.
    Properties:
    Name Type Description
    type String load
    target Map map
    Source:

  • zoomstart [source]

  • zoomstart event
    Properties:
    Name Type Description
    type String zoomstart
    target Map the map fires event
    from Number zoom level zooming from
    to Number zoom level zooming to
    Source:

  • zooming [source]

  • zooming event
    Properties:
    Name Type Description
    type String zooming
    target Map the map fires event
    from Number zoom level zooming from
    to Number zoom level zooming to
    Source:

  • zoomend [source]

  • zoomend event
    Properties:
    Name Type Description
    type String zoomend
    target Map the map fires event
    from Number zoom level zooming from
    to Number zoom level zooming to
    Source:

  • mousedown [source]

  • mousedown event
    Properties:
    Name Type Description
    type String mousedown
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • mouseup [source]

  • mouseup event
    Properties:
    Name Type Description
    type String mouseup
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • mouseover [source]

  • mouseover event
    Properties:
    Name Type Description
    type String mouseover
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • mouseout [source]

  • mouseout event
    Properties:
    Name Type Description
    type String mouseout
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • mousemove [source]

  • mousemove event
    Properties:
    Name Type Description
    type String mousemove
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • click [source]

  • click event
    Properties:
    Name Type Description
    type String click
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • dblclick [source]

  • dblclick event
    Properties:
    Name Type Description
    type String dblclick
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • contextmenu [source]

  • contextmenu event
    Properties:
    Name Type Description
    type String contextmenu
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • keypress [source]

  • keypress event
    Properties:
    Name Type Description
    type String keypress
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • touchstart [source]

  • touchstart event
    Properties:
    Name Type Description
    type String touchstart
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • touchmove [source]

  • touchmove event
    Properties:
    Name Type Description
    type String touchmove
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • touchend [source]

  • touchend event
    Properties:
    Name Type Description
    type String touchend
    target Map the map fires event
    coordinate Coordinate coordinate of the event
    containerPoint Point container point of the event
    viewPoint Point view point of the event
    domEvent Event dom event
    Source:

  • fullscreenstart [source]

  • fullscreenstart event
    Properties:
    Name Type Description
    type String fullscreenstart
    target Map the map fires event
    Source:

  • fullscreenend [source]

  • fullscreenend event
    Properties:
    Name Type Description
    type String fullscreenend
    target Map the map fires event
    Source:

  • cancelfullscreen [source]

  • cancelfullscreen event
    Properties:
    Name Type Description
    type String cancelfullscreen
    target Map the map fires event
    Source:

  • touchzoomstart [source]

  • touchzoomstart event
    Properties:
    Name Type Description
    type String touchzoomstart
    target Map the map fires event
    from Number zoom level zooming from
    Source:

  • touchzooming [source]

  • touchzooming event
    Properties:
    Name Type Description
    type String touchzooming
    target Map the map fires event
    Source:

  • touchzoomend [source]

  • touchzoomend event
    Properties:
    Name Type Description
    type String touchzoomend
    target Map the map fires event
    Source: