Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jperelli/vue2-leaflet-googlemutant

GoogleMutant plugin extension for vue2-leaflet package
https://github.com/jperelli/vue2-leaflet-googlemutant

Last synced: 26 days ago
JSON representation

GoogleMutant plugin extension for vue2-leaflet package

Awesome Lists containing this project

README

        

# vue2-leaflet-googlemutant

This is a [googlemutant plugin](https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant) extension for [vue2-leaflet package](https://github.com/KoRiGaN/Vue2Leaflet)

## Install

npm install --save vue2-leaflet-googlemutant vue2-leaflet leaflet leaflet.gridlayer.googlemutant

## Demo

git clone [email protected]:jperelli/vue2-leaflet-googlemutant.git
cd vue2-leaflet-googlemutant
yarn
yarn example

# or alternatively using npm
npm install
npm run example

Then you should be able to navigate with your browser and see the demo in http://localhost:4000/

You can see the demo code in the file [example.vue](example.vue)

## Usage

### on <template> add

something like this






For available languages and regions, refer to Google Maps documentation on [localizing the map](https://developers.google.com/maps/documentation/javascript/localization).

### on <script> add

#### option 1

In the same template file, at `` part, this will make the component available only to the template in this file

import Vue2LeafletGoogleMutant from 'vue2-leaflet-googlemutant'
...
export default {
...
components: {
'v-tilelayer-googlemutant': Vue2LeafletGoogleMutant
...
},
...
}

#### option 2

At main Vue configuration, this will make the component available to all templates in your app

import Vue from 'vue'
import Vue2LeafletGoogleMutant from 'vue2-leaflet-googlemutant'
...
Vue.component('v-tilelayer-googlemutant', Vue2LeafletGoogleMutant)

## Develop and build

npm install
npm run build

## Author

[Julián Perelli](https://jperelli.com.ar/)

## License

MIT