maps

Google Maps Places Autocomplete - Uncaught TypeError: Cannot read property 'getPlace' of undefined

房东的猫 提交于 2019-12-14 00:35:18
问题 setAutocomplete() { this.originPlaceId = null; this.destinationPlaceId = null; this.travelMode = google.maps.TravelMode.WALKING; this.directionsDisplay.setMap(this.map); this.setMapControls(this.map); this.setupClickListener('changemode-walking', google.maps.TravelMode.WALKING); this.setupClickListener('changemode-transit', google.maps.TravelMode.TRANSIT); this.setupClickListener('changemode-driving', google.maps.TravelMode.DRIVING); console.log(this.originInput); this.originAutocomplete =

How to display my location on Google Maps Nativescript

[亡魂溺海] 提交于 2019-12-13 22:25:57
问题 I'm using this plugin in my project. I want to show my location in map. In document I read in **UI Settings** myLocationButtonEnabled boolean - Whether the my-location button is enabled/disabled How to apply this in code? I try also to write this code: onMapReady(event) { this.mapView = event.object; var marker = new Marker(); marker.position = Position.positionFromLatLng(-33.86, 151.20); marker.userData = { index: 1 }; this.mapView.addMarker(marker); this.mapView.myLocationEnabled= true; }

Layering a ggplot2 map onto ggmap satellite with bathymetry data

萝らか妹 提交于 2019-12-13 17:21:24
问题 Okay so I wish to plot a plain map onto the ggmap base so that the ocean shows the bathymetry data. library(maps) library(mapdata) library(ggplot2) library(ggmap) #pick out the base layer I want get.Peru<-get_map(location = c(left = -85, bottom = -20, right = -70, top = -5), maptype="satellite") #this is the layer i wish to put over the top coast_map <- fortify(map("worldHires", fill = TRUE, plot = FALSE)) peru_bathy_map <- fortify(get.Peru) gg <- ggplot() gg <- gg + geom_map(data=peru_bathy

Android Map (V2) Marker InfoWIndowClickListener freezes (then crashes) when start child tab activity

空扰寡人 提交于 2019-12-13 15:39:55
问题 googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() { public void onInfoWindowClick(Marker marker) { Intent rest_list = new Intent(getParent(), RestFullDetail.class); TabGroupActivity parentActivity = (TabGroupActivity)getParent(); parentActivity.startChildActivity("mapRestDetail", rest_list); } }); When i tap on info window, info window freezes and doesn't navigate to another tab child activity. While freezing and crashing its not producing any logcat information

Subset a range of long and lat values

China☆狼群 提交于 2019-12-13 15:19:30
问题 I have a two data.frames with ranges of lat/long. One of the ranges is df1 includes all the values I need to keep. The second range, df2 are a wide variety of ranges. See maps below. I'm trying to subset df2 with only those lat/long that are located within the range of df1 . However, I'm using min() and max() functions to try and keep those ranges, but it's not working correctly. By using those two functions, it's only account for the linear relationship between the lat and long, and not the

Associative array without toString, etc

扶醉桌前 提交于 2019-12-13 12:10:01
问题 I want to create an associative array: var aa = {} //equivalent to Object(), new Object(), etc... and I want to be sure that any key I access is going to be a number: aa['hey'] = 4.3; aa['btar'] = 43.1; I know JS doesn't have typing, so I can't automatically check this, but I can ensure in my own code that I only assign strings to this aa. Now I'm taking keys from the user. I want to display the value for that key. However, if the user gives me something like "toString", he'll get back a

road map from location A to location B by latitude and longitude

夙愿已清 提交于 2019-12-13 10:22:49
问题 I am doing work with map and location. I want to have road map from one location to another location. I am providing latitude and longitude of both the location(destination and source). So please help me to have this map. I read about Google map api but I didn't find perfect answer. 回答1: Use below URL of google map API to find the road map route between two locations http://maps.google.com/?saddr=STARTINGADDRESS&daddr=DESTINATIONADDRESS 回答2: First you have to take the directions from Google.

How to display only exact region on any open-source map (like maptalks)? [duplicate]

懵懂的女人 提交于 2019-12-13 09:23:28
问题 This question already has answers here : Google Maps v3 - limit viewable area and zoom level (12 answers) Closed 6 months ago . I need to show only one region on the map. For example Alaska or New-York city. 回答1: This solution is relevant to many js libraries. 1. Get boundaries via nominatim.openstreetmap.org API in a geojson format. 2. Set polygon/multipolygon mask on a [base]layer 回答2: You could find you'r area boundary and set map to limit panning. look at sample below: var allowedBounds =

Google Maps iOS [closed]

别说谁变了你拦得住时间么 提交于 2019-12-13 08:35:01
问题 This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 6 years ago . I am trying to insert Google Maps in a CGRect in iOS. But the code below still displays the map in the entire iPhone page. How do I fix this CGRect rect

R: Add non-pch symbols to a map (polygon layer)

一个人想着一个人 提交于 2019-12-13 07:18:30
问题 I use R as a GIS here, to create a map. It's a monochrome (black/white) site plan. However, I want to distinguish forests from other areas using these open triangular symbols for coniferous forests that are quite common in cartography in the german speaking world. A bit of research led me to the my.symbols function from the TeachingDemos package. I understood one could write a function plotting the desired symbol in a xlim = c(-1,1) , ylim = c(-1,1) plot and then use TeachingDemos::my.symbols