tf-vue-geosearch

1.0.12 • Public • Published

tf-vue-geosearch

vue2 component for leaflet-geosearch

Install

npm install tf-vue-geosearch

Usage

import LGeosearch from "tf-vue-geosearch"
<l-geosearch ::options="geosearchOptions" :map="$refs.map.mapObject"/>
components: { LGeosearch },
data() {
    return {
        geosearchOptions: {
        provider: new OpenStreetMapProvider({
          params: {
            viewbox: "33.01721,44.82159,35.09912,44.33249",
            countrycodes: "ru,ua"
          }
        }),
        style: "button",
        autoComplete: true,
        autoCompleteDelay: 250,
        showMarker: true,
        showPopup: false,
        marker: {
          icon: <some icon>,
          draggable: false
        },
        popupFormat: ({ result }) =>
          `<div class="map-tooltip">
            <div class="map-tooltip__block">
              <div class="map-tooltip__item">${result.label}</div>
            </div>
          </div>`,
        maxMarkers: 1,
        retainZoomLevel: false,
        animateZoom: true,
        autoClose: true,
        searchLabel: "Поиск по адресу",
        keepResult: true
      },
    }
}

/tf-vue-geosearch/

    Package Sidebar

    Install

    npm i tf-vue-geosearch

    Weekly Downloads

    13

    Version

    1.0.12

    License

    MIT

    Unpacked Size

    245 kB

    Total Files

    8

    Last publish

    Collaborators

    • mrosminin