google-maps-api-3

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

Google My Maps - API

余生长醉 提交于 2020-08-17 12:59:49
问题 Is there any way to add Layers, Points, Directions or any data to a map in the Google My Maps, using API? I have searched in Google but didn't find a solution to do this. 回答1: Currently there is no any API to access MyMaps programmatically. I can see a feature request for this in the public issue tracker: https://issuetracker.google.com/issues/35820262 It looks like Google is evaluating the feasibility to implement the API, however, no timeline provided at the moment. Please star this feature

How to adapt Event DOM Listener to Google Maps JavaScript API v3.35

落爺英雄遲暮 提交于 2020-08-08 05:28:51
问题 I used to use the following code to catch users' Enter key event and automatically pick the first result from the Autocomplete results (pac-items) if users haven't selected any of them (i.e., there is no pac-item marked as pac-item-selected). var input = document.getElementById('pac-input') var autocomplete = new google.maps.places.Autocomplete(input) google.maps.event.addDomListener(input, 'keypress', function(e) { if (e.keyCode===13 && !e.triggered) { var suggestion_selected = document

How to adapt Event DOM Listener to Google Maps JavaScript API v3.35

本秂侑毒 提交于 2020-08-08 05:28:29
问题 I used to use the following code to catch users' Enter key event and automatically pick the first result from the Autocomplete results (pac-items) if users haven't selected any of them (i.e., there is no pac-item marked as pac-item-selected). var input = document.getElementById('pac-input') var autocomplete = new google.maps.places.Autocomplete(input) google.maps.event.addDomListener(input, 'keypress', function(e) { if (e.keyCode===13 && !e.triggered) { var suggestion_selected = document

Drawing polylines on Google Maps Streetview

江枫思渺然 提交于 2020-08-02 16:22:12
问题 I'm drawing some Markers and Polylines on Google Maps v3.exp. When I switch to StreetView, the markers are there, Polylines are not . Searched over the Google, SO, and all other known resources, and surprisingly there are absolutely no hints whatever about this particular question. Does anyone have any deeper information about the issue or is it hopeless to display for example some road information overlay on Streetview? A bit on different topic (although, related) - second thing I tried in

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

Google maps api dot marker

我是研究僧i 提交于 2020-08-01 12:19:28
问题 Currently I use a StyledMarker icon (the default bubble icon with custom colors), but I've seen that some sites use the more compact "dot" (picture of dot marker). My question is if it is possbile to replace the default bubble marker with the dot using StyledMarker? If not, how can I solve it (by the way the solution must allow dynamic coloring of the dots)? 回答1: You can declare the marker icon to be a symbol and customize it accordingly. new google.maps.Marker({ map: map, position: map

Google maps api dot marker

最后都变了- 提交于 2020-08-01 12:19:08
问题 Currently I use a StyledMarker icon (the default bubble icon with custom colors), but I've seen that some sites use the more compact "dot" (picture of dot marker). My question is if it is possbile to replace the default bubble marker with the dot using StyledMarker? If not, how can I solve it (by the way the solution must allow dynamic coloring of the dots)? 回答1: You can declare the marker icon to be a symbol and customize it accordingly. new google.maps.Marker({ map: map, position: map