google-maps-markers

Google Maps API v3 - Directions with draggable alternate routes

丶灬走出姿态 提交于 2020-07-09 15:47:30
问题 I've successfully implemented google map direction service api : https://developers.google.com/maps/documentation/javascript/directions with 'draggble' option enabled. Is it possible to show all routes together if multiple routes are available between 2 locations? The current code is similar to: https://developers.google.com/maps/documentation/javascript/examples/directions-draggable and I do have alternative routes available in response code as I've enabled provideRouteAlternatives: true . I

Google Maps API v3 - Directions with draggable alternate routes

匆匆过客 提交于 2020-07-09 15:47:27
问题 I've successfully implemented google map direction service api : https://developers.google.com/maps/documentation/javascript/directions with 'draggble' option enabled. Is it possible to show all routes together if multiple routes are available between 2 locations? The current code is similar to: https://developers.google.com/maps/documentation/javascript/examples/directions-draggable and I do have alternative routes available in response code as I've enabled provideRouteAlternatives: true . I

How to control google map markers' opacity

こ雲淡風輕ζ 提交于 2020-07-08 05:34:20
问题 I need to make some markers semi-transparent depending on time. Is there any way to control the CSS opacity of a marker? Or is it possible to reliably find out a marker's DOM element? I use Google Maps API v3. 回答1: There is no way via CSS. You could reference the markers in an array, and then loop through the array using the setIcon() method on each marker object to reference icons with different opacities (presuming you're using PNGs with alpha transparency). You'll have to call a function

Adding event listeners to hundreds of google maps markers

扶醉桌前 提交于 2020-06-28 06:28:11
问题 I'm using google maps javascript api v3. I have approx 500 markers set on the map. When I'm using the map on a mobile device there is significant lag when moving the map around and clicking on markers. I believe this lag is caused by having 500 event listeners for the 500 markers. I'd like to bind 1 event listener to the map container that can handle all map marker clicks, like this(using jquery): $('#map').on('click', 'marker', function(event) { alert('marker clicked: ' + marker.uniqueInfo);

How to rotate marker icon (svg image) in react google maps

左心房为你撑大大i 提交于 2020-06-28 06:28:10
问题 For my React app, I'm implementing Google Maps. I'm using react-google-maps library for maps. I want to rotate my customize marker icon . I have an SVG file (which has multiple paths and polygon) but Google Maps required in string type only (I think they will create SVG after giving path to icon) same problem as link. I followed same ans but I'm implementing in React so I'm unable to convert that code in React. Working code in JS var measle = new google.maps.Marker({ position: map.getCenter()

Geo Intent Label not showing in Google Maps App

一曲冷凌霜 提交于 2020-06-09 11:46:50
问题 Since my Google Maps app updated recently, now version 10.11.1 , the following code does not show the label as expected, documented, and previously working: val intent = Intent(Intent.ACTION_VIEW, Uri.parse("geo:38.8951,100.0364?q=38.8951,100.0364(foo)")).setPackage("com.google.android.apps.maps") if (intent.resolveActivity(packageManager) == null) { intent.setPackage(null) } startActivity(intent) And neither does this version (with 0,0 immediately after geo: ): val intent = Intent(Intent

How to add markers in react-google-maps?

非 Y 不嫁゛ 提交于 2020-05-10 06:23:12
问题 Using React JS in Meteor 1.5 Question : Need a way to add Marker using react-google-maps Using ES6 and in JSX format Followed the documentation and was able to get the map embedded in, but not able to add the marker. Here is my code: const InitialMap = withGoogleMap(props => { var index = this.marker.index || []; return( <GoogleMap ref={props.onMapLoad} defaultZoom={14} defaultCenter={{lat: 40.6944, lng:-73.9213}} > <Marker key={index} position={marker.position} onClick={() => props

How to add markers in react-google-maps?

我的未来我决定 提交于 2020-05-10 06:22:40
问题 Using React JS in Meteor 1.5 Question : Need a way to add Marker using react-google-maps Using ES6 and in JSX format Followed the documentation and was able to get the map embedded in, but not able to add the marker. Here is my code: const InitialMap = withGoogleMap(props => { var index = this.marker.index || []; return( <GoogleMap ref={props.onMapLoad} defaultZoom={14} defaultCenter={{lat: 40.6944, lng:-73.9213}} > <Marker key={index} position={marker.position} onClick={() => props

How to add markers in react-google-maps?

雨燕双飞 提交于 2020-05-10 06:21:59
问题 Using React JS in Meteor 1.5 Question : Need a way to add Marker using react-google-maps Using ES6 and in JSX format Followed the documentation and was able to get the map embedded in, but not able to add the marker. Here is my code: const InitialMap = withGoogleMap(props => { var index = this.marker.index || []; return( <GoogleMap ref={props.onMapLoad} defaultZoom={14} defaultCenter={{lat: 40.6944, lng:-73.9213}} > <Marker key={index} position={marker.position} onClick={() => props

How to add markers in react-google-maps?

本小妞迷上赌 提交于 2020-05-10 06:21:48
问题 Using React JS in Meteor 1.5 Question : Need a way to add Marker using react-google-maps Using ES6 and in JSX format Followed the documentation and was able to get the map embedded in, but not able to add the marker. Here is my code: const InitialMap = withGoogleMap(props => { var index = this.marker.index || []; return( <GoogleMap ref={props.onMapLoad} defaultZoom={14} defaultCenter={{lat: 40.6944, lng:-73.9213}} > <Marker key={index} position={marker.position} onClick={() => props