google-maps-api-3

Android Get the markers that are not clustered

不想你离开。 提交于 2019-12-23 17:53:26
问题 I'm developing an android application and I'm using Google Maps Android API Utility Library. To be more specific I'm using the cluster part of that library. Now to my question: I'm interested in the markers that are shown on the map but that are currently not clustered. I've tried different stuff but can't wrap my head around it. The thing that kind of works is to save all the rendered marker items in a arraylist then compare the marker positions to LatLng bounds of the map on screen, if the

Is there a benefit to using Encoded Polylines with Google Maps API v3? [closed]

怎甘沉沦 提交于 2019-12-23 17:43:41
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . If one is dealing with hundreds of polylines, would there be a big performance benefit to encoding the polylines using https:/

Google Maps API v3 - why no context with events?

余生颓废 提交于 2019-12-23 17:41:20
问题 Using Google Maps API v3 for the first time and I've got a map with a bunch of markers. I wanted to make it so when you click one, a specific InfoWindow will display (specific to the marker you clicked). I was really surprised that the click event doesn't tell you the actual marker that was clicked! I know there is a solution using a separate method to create a closure but that seems like a hack to me. Is there a better way to do it? Or, is there a way to ask the map "what markers exist at

Add HTML class/ID to Google Maps Marker (API V3)

帅比萌擦擦* 提交于 2019-12-23 16:59:40
问题 How can I add a class or ID to a Google Maps API V3 marker? I want to be able to access the markers using jQuery. EDIT: Hi clarkf, thanks for the response. Using Firebug I'm not able to see those classes when inspecting my map but I did notice there are two divs. One for the icon and one for the button. What I am trying to do is: I have a list of lost pets displayed on the site, they are also displayed on the map. Each pet in the list has a unique ID, and I want the ones on the map to mirror

Google Maps In Ionic Tab

那年仲夏 提交于 2019-12-23 16:28:12
问题 I'm trying to get Google Maps working under a vanilla Ionic 4 tab. This is the error I get. Error: Element must be under <body> at Function.push../node_modules/@ionic-native/google-maps/ngx/index.js.GoogleMaps.create (index.js:208) at Tab1Page.push../src/app/tab1/tab1.page.ts.Tab1Page.initMap (tab1.page.ts:24) Here is the tab HTML. <ion-header> <ion-toolbar> <ion-title> Find A Store </ion-title> </ion-toolbar> </ion-header> <ion-content> <div #map id="map_canvas" style="height:100%;"></div> <

Google Places returns wrong city

余生颓废 提交于 2019-12-23 16:10:02
问题 I am building an application using google autocomplete Places API. If I use the predictive suggestion for the address "Pongal, New York, NY, United States", I get following items in the return place object: locality: Manhattan administrative_area_level_2: New York administrative_area_level_1: New York As per documentation of google Places at: https://developers.google.com/maps/documentation/geocoding/ For US, locality can be used to fetch the city or town and *administrative_area_level_1* can

Border dectection on Infoboxes, so they don't get draw off the map

流过昼夜 提交于 2019-12-23 15:25:29
问题 What's the best way to recalculate the position of the infobox in a way it's always trying to be full draw inside the map but without moving the map. So if I try to open an infobox that is close to the right edge of the window it should draw the infobox to the left of the marker not on top of it, or to it's left. is there a framework for that ? Thanks ! My infobox options per request. var myOptions = { content: this.bigInfo(variables) ,disableAutoPan: false ,maxWidth: 0 ,pixelOffset: new

Animation between 2 points on Google maps

ぐ巨炮叔叔 提交于 2019-12-23 15:17:12
问题 I need to have a map with a list of markers on it. It needs to transition between these smoothly. I have the following code which currently loops around the markers. var x = 0; function pan_to() { if(x >= addresses.length){ x=0; } $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address='+addresses[x]+'&sensor=false', null, function (data) { var p = data.results[0].geometry.location var latlng = new google.maps.LatLng(p.lat, p.lng); map.panTo(latlng); }); x++; } setInterval(pan_to

Is it possible to get photo spheres in Google map bounds

巧了我就是萌 提交于 2019-12-23 15:16:04
问题 Is there any way to fetch available photo spheres (within map bounds) using the Google Maps API? I am trying to build a map like the one here, but can't figure out where to get the photo sphere data from, or if it's even possible - cannot find anything in the documentation other than standard streetview stuff. edit: I do know that individual photo spheres can be fetched by their pano_id , but need a more efficient way to get a bunch of them onto my map. Manually creating a pano_id collection

Load Google Maps API in jsdom

随声附和 提交于 2019-12-23 14:18:20
问题 I am trying to load the Google Maps API in jsdom. More specifically I am interested in getting the data from the getPanorama callback function. However, when I execute the following code I see 'Executed with no error', but I don't see any of the messages 'status ok' or 'status not ok'. var jsdom = require("jsdom"); var cafe = {lat: 51.47803167, lng: 0.141212256}; jsdom.env({ html: "<html><body></body></html>", scripts: ["https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"], done: