google-maps-markers

How to find all the the markers which are currently visible on Google Maps V3?

筅森魡賤 提交于 2019-12-12 11:00:05
问题 I have a sidebar on which I want to display all the markers which are placed on the Google Map. and when I change the Veiwport by dragging the map. The marker list should refresh. 回答1: To Get all the Markers first you have to find the Bounds of the current Viewport then you have to loop all the markers and see if they are contains in the bound. The following is a example. var bounds =map.getBounds(); for(var i = 0; i < markers.length; i++){ // looping through my Markers Collection if(bounds

iOS Google Maps SDK, Can't listen to GMSMarker tap event

烈酒焚心 提交于 2019-12-12 10:56:35
问题 I'm stuck with GoogleMaps SDK for iOS... I want to add some features when I tap on a GMSMarker on my Google Map, but it doesn't work. Is there something wrong? FirstController.h #import <UIKit/UIKit.h> #import <GoogleMaps/GoogleMaps.h> #import <CoreLocation/CoreLocation.h> #import "sqlite3.h" @interface FirstViewController : UIViewController <CLLocationManagerDelegate, GMSMapViewDelegate> { sqlite3 *db; } FirstController.m [...] -(void)locationManager:(CLLocationManager *)manager

Google Map Api Marker not showing with Reactjs

与世无争的帅哥 提交于 2019-12-12 10:10:37
问题 I am trying to display a google map with a marker. I am using React.js. The map displays in the correct location, but the marker does not show and I get multiple 'object is not extensible' error in the browser console The code looks like this /** @jsx React.DOM */ var Map = React.createClass({ initialize: function() { var lat = parseFloat(this.props.lat); var lng = parseFloat(this.props.lon); var myPosition = new google.maps.LatLng(lat,lng); var mapOptions = { center: myPosition, zoom: 8 };

Google Maps v2: how to display various markers with the same coordinates

吃可爱长大的小学妹 提交于 2019-12-12 09:45:26
问题 I'm using Google Maps JavaScript API V2 to mark locations saved in an array. Markers with different coordinates are displayed well, but I have no idea how to display various markers with the same coordinates. I need it because an array of locations can have the same coordinates, but with a different description. What is the way to display those different descriptions? The code where markers are added is: var map; function loadEarth(mapdiv) { if (GBrowserIsCompatible()) { if(!mapdiv) return

Save markers on Android google maps v2

女生的网名这么多〃 提交于 2019-12-12 08:09:43
问题 I am using Android Google maps v2 API and have it set up to add markers on long click. I need a way to save these markers and reload them when the app resumes again. What will be the best way to do this? Please help Currently I add markers as follows: map.addMarker(new MarkerOptions().position(latlonpoint) .icon(bitmapDescriptor).title(latlonpoint.toString())); 回答1: I got it! I can easily do this via saving the array list of points to a file and then reading them back from file I do the

How to make mixed path road type? (snap to roads and simple polyline) Google Maps API

北战南征 提交于 2019-12-12 06:59:09
问题 I need to draw the path, but the road has the flights on the way. So I want to make something like in my example, but I need to draw it on page init instant of a manual. But I don't know how to mix this two ways to draw maps (Polilyne and Snap to roads). It needs to works from an array of lat lng like that: var points = new google.maps.MVCArray([ new google.maps.LatLng(39.9042, 116.407396), new google.maps.LatLng(34.341574, 108.93977), new google.maps.LatLng(31.23039, 121.473702), new google

Check/uncheck all button to show/hide all markers Google maps api

安稳与你 提交于 2019-12-12 06:39:07
问题 Who can help me out with the following: from several sources I combined some javascript to make a google map with a dropdown-menu. From this menu I'm able to place/hide markers on the map by categorie. That part works fine, but now I'm trying to get the "check all"/"uncheck all" buttons inside the menu to work... So far the buttons do check/uncheck the checkboxes, but the markers on the map are not responding accordingly. I tried several options like Remove all markers google map v3 & Google

List<ViewObject> list always return list size() =1 Here map

耗尽温柔 提交于 2019-12-12 06:29:15
问题 Here I am adding marker on map: hereMap.addMapObject(new MapMarker(new GeoCoordinate(lat,lng), myImage) .setTitle("marker"+geoCounter) .setDescription(" \nLatitude :" +lati+ "\nLongitude : "+ lng)); adding lat lng with array list of lat lng but when I add the marker with the help of: @Override public void onLocationChanged(Location location) {...} List<ViewObject> list gives me the exact size of the added marker. In this case, I get lat long with: location.getLatitude() location.getLongitude(

index value issue on the markers

房东的猫 提交于 2019-12-12 06:13:30
问题 I want to display these values on markers from the fcmUsers list when user click on marker it will show its own value or data in text view from the fcmUsers list fcmUsers List have public Long createdat; and public Long hajjappnum; DatabaseReference UserRef = FirebaseDatabase.getInstance().getReference().child("GPSLocationHistory").child("DevicesLatest"); UserRef.keepSynced(true); new GetDataFromFirebase().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); FirebaseDatabase database =

Android current location marker ID (name)

喜夏-厌秋 提交于 2019-12-12 05:44:19
问题 I am pretty much a novice at Android development, so please feel free to describe in very simple terms any advice you may give in response to my query. I would like my application to start by displaying an Activity zoomed out to an extent that shows both my current location and that of a marker that I have placed on a map some distance from me. I have successfully placed and displayed the remote marker the on the map and have found this class: LatLngBounds.Builder, which allows me to