NTag / dotted-map

Create futuristic SVG maps, Tron-like, filled with dots or hexagons
https://ntag.fr/tron-like-maps/
MIT License
115 stars 23 forks source link

Error: "poly is not defined" #11

Closed thomas4Bitcraft closed 1 year ago

thomas4Bitcraft commented 1 year ago

I get the mentioned error when I try to add a Pin to the map. Here is the code I use:

const createMap = () => {
    const map = new DottedMap({
        height: 60,
        grid: 'vertical',
        avoidOuterPins: true,
    });

    map.addPin({
        lat: 40.73061,
        lng: -73.935242,
        svgOptions: { color: '#d6ff79', radius: 0.4 },
    });

    mapSvg.value = map.getSVG({
        shape: 'circle',
        color: '#FFFFFF',
        radius: 0.22,
    });
}

onMounted(() => createMap())

And this is the error message:

Uncaught (in promise) ReferenceError: poly is not defined
    at Object.getPin (index.js:1:259757)
    at Object.addPin (index.js:1:259544)
    at createMap (statistics.vue:23:11)
    at statistics.vue:38:21
    at chunk-FBYHIP7F.js:4075:88
    at callWithErrorHandling (chunk-FBYHIP7F.js:1565:18)
    at callWithAsyncErrorHandling (chunk-FBYHIP7F.js:1573:17)
    at hook.__weh.hook.__weh (chunk-FBYHIP7F.js:4055:19)
    at flushPostFlushCbs (chunk-FBYHIP7F.js:1731:41)
    at flushJobs (chunk-FBYHIP7F.js:1769:5)

Any ideas?

thomas4Bitcraft commented 1 year ago

Will close it for now as removing the avoidOuterPins attribute fixed it.