google-maps-markers

Google Maps v3 custom marker icon does not keep it's position on map

两盒软妹~` 提交于 2020-08-22 11:44:44
问题 Developing with Google Maps v3. For some sort of reason, my custom marker icon "change" it's position on zoom in-out. It looks like it have some sort of "padding" property, that not changes together with zoom. It means that it position is correct on maximum zoom (18), but if I change zoom value, it "moves" a bit to top, and it makes problem on smaller zoom values, because it looks like it is not on same position as it is. Marker is defined as: var image = new google.maps.MarkerImage('img

Google Maps v3 custom marker icon does not keep it's position on map

こ雲淡風輕ζ 提交于 2020-08-22 11:40:33
问题 Developing with Google Maps v3. For some sort of reason, my custom marker icon "change" it's position on zoom in-out. It looks like it have some sort of "padding" property, that not changes together with zoom. It means that it position is correct on maximum zoom (18), but if I change zoom value, it "moves" a bit to top, and it makes problem on smaller zoom values, because it looks like it is not on same position as it is. Marker is defined as: var image = new google.maps.MarkerImage('img

How could I call a Angular2 function from a Google Map infowindow?

泄露秘密 提交于 2020-08-02 04:46:10
问题 Google map is integrated the javascript way and I want to call a angular2 function inside an infowindow like the following code. Take a look at infoContent for the button. for (i = 0; i < locations.length; i++) { let locLatLng = new google.maps.LatLng(locations[i].latitude, locations[i].longitude); let infoContent = '<button (click)="myFunction(' + locations[i].id + ')">Details ...</button>'; marker = new google.maps.Marker({ position: locLatLng, map: this.map }); google.maps.event