Methods

Method for navigating to specific shape based on latitude, longitude and zoom level, you can use navigateTo method.

  • CSHTML
  • @(Html.EJ().Map("Map1"))
  • JS
  • var map = $("#Map1").data("ejMap");
    map.navigateTo();

    pan(direction)

    Method to perform map panning, you can use pan method.

  • CSHTML
  • @(Html.EJ().Map("Map1"))
  • JS
  • var map = $("#Map1").data("ejMap");
    map.pan();

    refresh()

    Method to reload the map, you can use refresh method.

  • CSHTML
  • @(Html.EJ().Map("Map1"))
  • JS
  • var map = $("#Map1").data("ejMap");
    map.refresh();

    refreshLayers()

    Method to reload the shapeLayers with updated values, you can use refreshLayers method.

  • CSHTML
  • @(Html.EJ().Map("Map1"))
  • JS
  • var map = $("#Map1").data("ejMap");
    map.refreshLayers();

    refreshNavigationControl(navigation)

    Method to reload the navigation control with updated values, you can use refreshNavigationControl method.

  • CSHTML
  • @(Html.EJ().Map("Map1"))
  • JS
  • var map = $("#Map1").data("ejMap");
    map.refreshNavigationControl();

    zoom(level, isAnimate)

    Method to perform map zooming, you can use zoom method.

  • CSHTML
  • @(Html.EJ().Map("Map1"))
  • JS
  • var map = $("#Map1").data("ejMap");
    map.zoom();

    Events

    MarkerSelected

    Triggered on selecting the map markers, you can use MarkerSelected event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .MarkerSelected("MarkerSelected")
    
    )
  • JS
  • function MarkerSelected(){
        // Do Something
    }

    Mouseleave

    Triggers while leaving the hovered map shape, you can use Mouseleave event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .Mouseleave("MouseLeave")
    
    )
  • JS
  • function MouseLeave(){
        // Do Something
    }

    Mouseover

    Triggers while hovering the map shape, you can use mouseover event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .Mouseover("MouseOver")
    
    )
  • JS
  • function MouseOver(){
        // Do Something
    }

    OnRenderComplete

    Triggers once map render completed, you can use OnRenderComplete event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .OnRenderComplete("RenderComplete")
    
    )
  • JS
  • function RenderComplete(){
        // Do Something
    }

    Panned

    Triggers when map panning ends, you can use Panned event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .Panned("Panned")
    
    )
  • JS
  • function Panned(){
        // Do Something
    }

    ShapeSelected

    Triggered on selecting the map shapes, you can use ShapeSelected event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .ShapeSelected("ShapeSelected")
    
    )
  • JS
  • function ShapeSelected(){
        // Do Something
    }

    ZoomedIn

    Triggered when map is zoomed-in, you can use ZoomedIn event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .ZoomedIn("ZoomedIn")
    
    )
  • JS
  • function ZoomedIn(){
        // Do Something
    }

    ZoomedOut

    Triggers when map is zoomed out, you can use ZoomedOut event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .ZoomedOut("ZoomedOut")
    
    )
  • JS
  • function ZoomedOut(){
        // Do Something
    }

    ShapeRendering

    The ShapeRendering event is triggered while rendering each shape in the map.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .ShapeRendering("shape")
    
    )
  • JS
  • function shape(){
        // Do Something
    }

    BubbleRendering

    The BubbleRendering event is triggered while rendering each bubble in the map.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .BubbleRendering("bubble")
    
    )
  • JS
  • function bubble(){
        // Do Something
    }

    LegendItemRendering

    The LegendItemRendering event is triggered before rendering each legend in the map.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .LegendItemRendering("legend")
    
    )
  • JS
  • function legend(){
        // Do Something
    }

    Click

    Triggers while clicking on the layers of the map, you can use Click event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .Click("click")
    
    )
  • JS
  • function click(){
        // Do Something
    }

    DoubleClick

    Triggers while double clicking on the layers of the map, you can use DoubleClick event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .DoubleClick("doubleClick")
    
    )
  • JS
  • function doubleClick(){
        // Do Something
    }

    RightClick

    Triggers while right clicking on the layers of the map, you can use RightClick event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .RightClick("rightClick")
    
    )
  • JS
  • function rightClick(){
        // Do Something
    }

    Load

    Triggers before loading the map, you can use Load event.

  • CSHTML
  • @(Html.EJ().Map("container")
    
    .Load("load")
    
    )
  • JS
  • function load(){
        // Do Something
    }