Coder Social home page Coder Social logo

Comments (5)

eregnier avatar eregnier commented on July 1, 2024

I have not enough clues with your code sample.
I guess your issue comes from markers data. You may check this content and find out why is there some duplicate markers.
I also may help more if you share me some shareable markers data. (you may share the whole annonymised for exemple.

I have no other issues like this until now and there are now quite some user using this plugin. I doubt this issue comes from this plugin, however if we find where does it comes from and in case this issue is related this plugin code, I'd be happy to fix it.

Let me know if you still need help on this topic.

from vue2-gmap-custom-marker.

barkovskiy avatar barkovskiy commented on July 1, 2024

@eregnier

Markers come from backend and has unique id. Marker example:
{"id":6,"lat":55.6668532,"lng":37.2757566}

I added check for marker existence (check by isAdded props in inst object) in afterCreate function and this fix my trouble with duplicates, but i received next error:
DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

This error appears only when an array with markers comes from the backend, and some of the past markers are missing from it.

Marker code:

<gmap-custom-marker
     v-for="marker in markers"
     v-bind:key="marker.id"
     :marker="marker.pos"
     @click.native="event => showFacility(marker.id, event)"
     @mouseover.native="receiveFacility(marker.id)"
     :z-index="marker.id === selectedMarkerId ? 50 : 10"
>
     <div class="map-marker">
          <div class="icon">
               <img src="/img/building.png" />
          </div>
          <div class="body" v-if="marker.id === selectedMarkerId">
              ...
          </div>
     </div>
</gmap-custom-marker>

from vue2-gmap-custom-marker.

eregnier avatar eregnier commented on July 1, 2024

try to wrap your custom markers into a div if you have many sibbling custom marker. This prevent vue to loose track of your components.

Let me know if this solved your issue.

from vue2-gmap-custom-marker.

eregnier avatar eregnier commented on July 1, 2024

@barkovskiy any news ? If no I will close soon.

from vue2-gmap-custom-marker.

eregnier avatar eregnier commented on July 1, 2024

close due to inactivity.

from vue2-gmap-custom-marker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.