How to scale and change background of Google Map marker with javascript -


is possible animate scaling of marker icon instead of changing icon javascript?

i'ved added multiple markers google map so:

var houseicon = {     path: 'm0,12h4.5v7.5h3v12h12v6l6,0l0,6v12z',     fillcolor: '#ff4b3d',     fillopacity: 0.8,     scale: 1,        strokecolor: '#ff4b3d',     strokeweight: 1 };  var marker = new google.maps.marker({     position    : latlng,     map         : map,     id          : 'post-'+marker_id,     icon:  houseicon }); 

i wish able scale icon , preferrably change it's backgroundcolor when hover html element located outside google map.

i've used seticon() method change background ..but i'd to, if possible, animate scaling of icon instead of displaying bigger icon.

here current hover function:

$('.my-element').hover(        function() {         data_id = $(this).attr('data-id');          for( i= 0; < map.markers.length; i++ ){             if( map.markers[i].id== 'post-'+data_id){                map.markers[i].seticon("path-to-bigger-icon");              }         }       }, function() {             data_id = $(this).attr('data-id');          for( i= 0; < map.markers.length; i++ ){             if( map.markers[i].id== 'post-'+data_id){                 map.markers[i].seticon("path-to-small-icon");                            }         }        }     ); 

i solved using richmarker , attaching events content elements added marker.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -