All Components

Map Overview

The Map displays geospatial information which is organized in layers and is supported by both desktop and mobile devices.

The Map wrapper for Vue is a client-side wrapper for the Kendo UI Map widget.

Basic Usage

The following example demonstrates how to initialize the Map.

<div id="vueapp" class="vue-app">
    <kendo-map :center="[30.268107, -97.744821]"
               :zoom="5"
               style="width: 100%; height: 500px;">

        <kendo-map-layer :type="'tile'"
                         :url-template="'https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png'"
                         :subdomains="['a', 'b', 'c']"
                         :attribution="'&copy; <a href=\'https://osm.org/copyright\'>OpenStreetMap contributors</a>'">
        </kendo-map-layer>
        <kendo-map-marker :location="[30.268107, -97.744821]"></kendo-map-marker>
        <kendo-map-marker :location="[32, -97.744821]"></kendo-map-marker>
        <kendo-map-marker :location="[34, -97.744821]"></kendo-map-marker>
    </kendo-map>
</div>
Vue.use(MapInstaller);

new Vue({
    el: '#vueapp'
})

Installation

To initialize the Map, either:

Initializing with Webpack

  1. Install Kendo UI and add a theme:

    npm install --save @progress/kendo-ui
    npm install --save @progress/kendo-theme-default
  2. Install the Kendo UI for Vue Map package.

    npm install --save @progress/kendo-map-vue-wrapper
  3. Import the Kendo UI packages to the App component. If you use the Kendo UI components more than once in your application, add all Kendo UI-related files to the main.js file. If you use the Kendo UI components once in your application, add the Kendo UI-related files the component where they will be referred.

    import '@progress/kendo-ui'
    import '@progress/kendo-theme-default/dist/all.css'
    
    import { Map,
            MapMarker,
            MapLayer,
            MapInstaller } from '@progress/kendo-listview-vue-wrapper'
    
    Vue.use(MapInstaller)
    
    new Vue({
       el: '#app',
       components: {
           Map,
           MapMarker,
           MapLayer,
           MapInstaller
       }
    })

Functionality and Features

In this article