google-maps-api-3

geocode does not determine point location exactly on google map

∥☆過路亽.° 提交于 2019-12-25 10:55:49
问题 In google map when I drag a marker lat() and lng() values shown in textboxes. I want do to like here: Coordinates change for every movement My following code parts work for me. But, when I drag a marker to far, it works, but in little distances lat() and lng() don't change? How can I solve this issue? main js codes are: // fill in the UI elements with new position data function update_ui(address, lat, lng) { $('#lat').val(lat); $('#lng').val(lng); } // move the marker to a new position, and

Google Maps Xpath using Google Spreadsheet IMPORTXML

拈花ヽ惹草 提交于 2019-12-25 10:31:48
问题 I am trying to use Pull data from google maps results using IMPORTXML function in google spreadsheet but I am getting error #N/A =importxml(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,"//div[@class='name lname']) or =importxml(http://maps.google.com/maps?q=cosmetic+surgeon+NEAR+New+York%2C+NY%2C+United+States&output=classic&dg=ntvb,//SPAN[@class='pp-place-title']) but nothing is working.. Any thoughts??? Thanks 回答1: If you're

Angular 2 can't call class function

孤人 提交于 2019-12-25 10:01:22
问题 inside my class I have a simple function that logs errors called logError(error); I also use google maps api to grab latitude and longitude of an address, so all together this looks like this inside my exported class. //Log error logError(err) { console.error('Error: ' + err); } //Get Coordinates from address postcodeCoordinates(address: string, postcode: string) { var geocoder = new google.maps.Geocoder(); geocoder.geocode( { 'address': address + ', ' + postcode}, function(results, status) {

Google Maps API - Marker Clustering not working

你。 提交于 2019-12-25 09:42:29
问题 I'm presently working on a Google Map that will display many map markers, the data is in a series of arrays in an external JSON file. It is using Spiderfier as well for markers that overlap because they have the same coordinates. I'm trying to implement Marker clustering to make the map a little less cluttered when zoomed out, however clustering is not occurring. The console on the developer tools keeps logging "Uncaught TypeErrors" with the markerclusterer.js source code, claiming it cannot

Google Maps API: Load specific version

早过忘川 提交于 2019-12-25 09:42:13
问题 When I try to load a specific version of the Maps API, lets say this one: https://maps.googleapis.com/maps/api/js?v=3.28 and log the version with console.log(google.maps.version) , I get version 3.29.14b . Here is a fiddle https://jsfiddle.net/7xsxg4cv/. Even stranger to me is the behaviour in this fiddle https://jsfiddle.net/c15sfj21/. What am I possibly doing wrong? 回答1: From: https://groups.google.com/forum/#!topic/google-maps-js-api-v3-notify/KlGOnEB4SMs We will be making the current

Google Maps API: Load specific version

五迷三道 提交于 2019-12-25 09:42:11
问题 When I try to load a specific version of the Maps API, lets say this one: https://maps.googleapis.com/maps/api/js?v=3.28 and log the version with console.log(google.maps.version) , I get version 3.29.14b . Here is a fiddle https://jsfiddle.net/7xsxg4cv/. Even stranger to me is the behaviour in this fiddle https://jsfiddle.net/c15sfj21/. What am I possibly doing wrong? 回答1: From: https://groups.google.com/forum/#!topic/google-maps-js-api-v3-notify/KlGOnEB4SMs We will be making the current

Google Maps OverlayView: make only SVG clickable

ぐ巨炮叔叔 提交于 2019-12-25 09:30:14
问题 I have a Google Map with multiple SVG overlays. But when I add a click event on these SVG, all the overlay is clickable and I want it to work only for the SVG path. Here's a fiddle https://jsfiddle.net/gmkfhr9s/1/ I'm using the Custom overlays documentation as a base https://developers.google.com/maps/documentation/javascript/customoverlays USGSOverlay.prototype.onAdd = function() { var div = document.createElement('div'); div.style.borderStyle = 'dotted'; div.style.borderWidth = '2px'; div

google maps api get lat and lng and replace marker?

戏子无情 提交于 2019-12-25 09:28:42
问题 So at the moment when user enter address it adds the marker which is fine, user can also move the marker to a new location and retrieve it's lat and lng. However what it doesn't do is: Get lat and lng from the address (when pin is added to page) If address changes it adds a new marker instead of replacing existing one. Here's the code: var map; function initMap() { map = new google.maps.Map(document.getElementById('map'), { zoom: 8, center: {lat: -34.397, lng: 150.644} }); var geocoder = new

Draw particular elements on a map

限于喜欢 提交于 2019-12-25 09:13:37
问题 The symbols on the map are custom markers that I added to the map thanks to Google API. To set their position, I use some coords stored in my database. I want to change it with some rectangles like this: I can't use one unique "sample rectangle" to repeat, because it will not follow the road orientation. This is my code (PHP/JavaScript). <?php $array_sensori = array(); $array_sensori = SensoreDAO::readArrayAllSensori($_SESSION['id_comune'], 0; ?> <script> function initMap() { var map = new

Google Maps API MVCArray isn't being accepted by Polyline()

别来无恙 提交于 2019-12-25 08:57:20
问题 I have a simple code plotting markers and then connecting them together with a polyline but the MVCArray I am trying to use with the Polyline isn't working (and by "isn't working" I mean that the Polyline isn't being plotted). Here is my code: $(document).ready(function(){ var latlng = new google.maps.LatLng(36.686041,-80.661621); var map = new google.maps.Map(document.getElementById("network_map"),{ zoom: 6, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }); $("input[name='submit']