LouisMazel / vue2-leaflet-movingmarker

MovingMarker plugin extension for vue2-leaflet package
https://louismazel.github.io/vue2-leaflet-movingmarker/
MIT License
24 stars 14 forks source link

TypeError: "this.parentContainer.unbindPopup is not a function" #2

Closed GopherJ closed 5 years ago

GopherJ commented 5 years ago
    <l-map ref="map" style="height: 100%" :zoom="zoom" :center="getDefaultMapCenter" :maxZoom="maxZoom">
            <l-tile-layer :url="url" :attribution="attribution" :options="options"/>

            <l-geo-json
                v-for="(item, key, idx) in getFilteredSlicedHitsOfUsers"
                :key="key"
                :geojson="item.features"
                :options="options"
                :options-style="styleFunction(item.color)">
            </l-geo-json>

            <l-moving-marker
                v-for="(item, key, idx) in getFilteredSlicedHitsOfUsers"
                :lat-lng="item.lat_lng"
                :duration="1000"
                :key="key">
                <l-icon
                    :icon-size="iconSize"
                    :icon-anchor="iconAnchor"
                    :popup-anchor="popupAnchor"
                    :tooltip-anchor="tooltipAnchor">
                    <div class="u-marker" :style="{ backgroundColor: item.color }">
                        <span class="marker-label"
                            :class="[{ 'is-active': hasSelectedUser }]">
                            {{ !hasSelectedUser ? idx + 1 : '&#x25cf;' }}
                        </span>
                        <span class="marker-tooltip"
                            :style="{ borderColor: item.color }"
                            :class="[{ 'is-active': hasSelectedUser }]">
                            {{ item.user.name || key.slice(0, 6) + '...' }}
                        </span>
                    </div>
                </l-icon>
                <l-popup :content="item.title"></l-popup>
            </l-moving-marker>
        </l-map>
GopherJ commented 5 years ago

It seems that I cannot make it works together with LPopup

GopherJ commented 5 years ago

Update Vue2-leaflet to 2.2.1 fixed this problem