google-maps-markers

How to add markers in react-google-maps?

别来无恙 提交于 2020-05-10 06:21:28
问题 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:09
问题 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

Google Maps user-editable polygon with fixed number of points in Android?

梦想与她 提交于 2020-05-07 09:24:57
问题 The bounty expires in 3 days . Answers to this question are eligible for a +50 reputation bounty. BlackCoder wants to draw more attention to this question. I am working on Google Map polygon marker, I have predefined lat/long array, and need to set polygon area, It is working fine for me, but when I drag the marker polygon line doesn't change, it should have to be change as I drag the marker. Here is my problem, I'll put a picture to illustrate it easier. here is the code : myMap

addOnCompleteListener is Unchecked and crashes app

匆匆过客 提交于 2020-04-30 10:04:18
问题 I have this code: // Using this method to center MyLocation as default location when app is started private void getDeviceLocation() { Log.d(TAG, "getDeviceLocation: getting the devices current location"); mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this); try { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE

addOnCompleteListener is Unchecked and crashes app

两盒软妹~` 提交于 2020-04-30 10:02:23
问题 I have this code: // Using this method to center MyLocation as default location when app is started private void getDeviceLocation() { Log.d(TAG, "getDeviceLocation: getting the devices current location"); mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this); try { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE

Google Maps API : Rotation with a custom marker Icon

纵然是瞬间 提交于 2020-04-17 19:35:39
问题 I'm working with Google Map Javascript API and I'm trying to create a custom Marker with a custom Icon which works with rotation, var marker = new google.maps.Marker({ position: latlng, map: this.map }); marker.setIcon({ url:"assets/icon/nav.png", //path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 1, rotation: heading, scaledSize: new google.maps.Size(35, 35), }); The rotation attribute is working with google.maps.SymbolPath.XXXX as the line commented in the code but not with a

Google Maps API : Rotation with a custom marker Icon

ⅰ亾dé卋堺 提交于 2020-04-17 19:30:19
问题 I'm working with Google Map Javascript API and I'm trying to create a custom Marker with a custom Icon which works with rotation, var marker = new google.maps.Marker({ position: latlng, map: this.map }); marker.setIcon({ url:"assets/icon/nav.png", //path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW, scale: 1, rotation: heading, scaledSize: new google.maps.Size(35, 35), }); The rotation attribute is working with google.maps.SymbolPath.XXXX as the line commented in the code but not with a

Loading 100-200K markers on google map

我怕爱的太早我们不能终老 提交于 2020-04-08 08:59:25
问题 At the moment I'm using Google Maps v.3 API for drawing markers on the map. I have around 500 markers in total. For displaying purposes I use markerCluster and group markers using this tool on the client side in the browser. However, I plan to expand the locations number and assume it can grow to 100K or even 200K quickly. I did some stress tests, and realized that current solution basically kills the browser and about 10-20K markers. So my question what is the best approach to draw that many

Loading 100-200K markers on google map

守給你的承諾、 提交于 2020-04-08 08:58:34
问题 At the moment I'm using Google Maps v.3 API for drawing markers on the map. I have around 500 markers in total. For displaying purposes I use markerCluster and group markers using this tool on the client side in the browser. However, I plan to expand the locations number and assume it can grow to 100K or even 200K quickly. I did some stress tests, and realized that current solution basically kills the browser and about 10-20K markers. So my question what is the best approach to draw that many

React and google-maps-react. Not displaying InfoWindow

≡放荡痞女 提交于 2020-03-24 12:07:14
问题 I am using React and google-maps-react library for a project. I am trying to display InfoWindows for each of the markers. But it is not working. I have looked at the documentation as well as GitHub issues for this and have no been able to find a solution. Here is the code import React from "react"; import { connect } from "react-redux"; import { Map, GoogleApiWrapper, Marker, InfoWindow } from "google-maps-react"; import { API_GOOGLE_MAPS } from "../config"; const mapStyles = { width: "100%",