Tag Info

New answers tagged


This plugin for Debian lacks this problem, but does not meet terms of service of google (Oficial example). Or try this code: var map = L.map( 'map' ).setView( [ 51.505, -0.09 ], 13 ); L.tileLayer( '//mt{s}.googleapis.com/vt?x={x}&y={y}&z={z}', { maxZoom: 18, subdomains: [ 0, 1, 2, 3 ] } ).addTo( map ); var marker = L.marker( [ 51.5, -0.09 ] ...


What you are describing is a well known issue with animation of Google basemap tiles in Leaflet, and unfortunately, I don't think there is an easy solution. The map in the fiddle uses the Leaflet Google.js plugin by Pavel Shramov. As explained in this answer by @mourner, this plugin "acts as a proxy to the original Google Maps API v3, so it doesn't work ...


You can do it without having to create a million different icon images if you use CSS. Add the marker find the backgroundcolor attribute for the css and change it. Here it is: var marker = L.marker([50,-20], {icon: myIcon}).addTo(map); marker.valueOf()._icon.style.backgroundColor = 'green'

Top 50 recent answers are included