Open UnsterblichMedic opened 5 years ago
In order to help you, you should provide provide : a link to an online demo + the problematic kml file ?
Ok. Sorry I am new to this. I am working on it. A lot of code I am trying to figure out how to add it to JSFiddle without adding ALL of it.
Here is the kml file. Upon inspection, it seems the push pins have a margin-top: 3px; margin-left: -20px on initial load. Upon reload, they get margin-top: -61px; margin-left: -20px and stays at that. The other symbols don't seem to have this.
I apologize. I have my files mixed up. The problem is with changes I made to the KML.js. I was using changes from #197 . It is rescaling the icons by "this.style.width = Math.ceil(i.width * scale) + 'px';" and it is messing it up. Sorry, still learning all of this.
Ok, still having the issue with the original KML.js file. After I refresh a couple times the placemarks go to the correct location. Again, it seems to have to do with the margin-left and margin-top. Those are what change after I refresh a couple times. Goes from -10px and 32px (incorrect) to -10px and -32px (correct). I don't know how to add the KML file to jsfiddle, but if you can, this code should work.
Loads KML file. The polygon lines are all in the correct positions. The Placemarks all load but are just slightly off from the coordinates. In Google Earth they are exactly right. On Leaflet though, all of them are off by the same amount (up and to the left slightly). I am running Leaflet 1.4.0. Is this the reason why? Do I need to downgrade my Leaflet to 1.0.x or lower?