maps

Suggest list in google maps search input

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We need to create search input field like it is on _ http://maps.google.com The key functionality is suggest list with appropriate results. We have not found this feature in API. Analyzing maps.google.com we see that suggest list is received from get request to this url https://maps-api-ssl.google.com/maps/suggest?q=%D0%BC%D0%BE%D1%81&cp= ... There are many parameters, including data from search field. This get request returns our suggest list. Is there a possibility to use this url in our needs with our data. Or how can we make it in some

GetMap() return null on Android with Google Maps API v2

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have some problems with Google Maps API V2. I have tried many tutorials and searched many answers (include stack overflow) but all I have found was not work. I can draw a map with xml tag <fragment> . No problem, it works. But when I try to get the map in MainActivity.java getMap() return null and I don't know why. MainActivity.java package com.example.testmaps; import android.app.Activity; import android.os.Bundle; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms

How to detect that a point is inside a Polygon using Google Maps SDK for iOS?

匿名 (未验证) 提交于 2019-12-03 08:52:47
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: With the Google Maps SDK for iOS, is it possible to detect that a point is inside a Polygon? I found containsLocation() function in Google Maps JavaScript API, however, I couldn't find the same one in the iOS SDK. Do you know any other ways? 回答1: The Google Maps SDK for iOS now contains a function called GMSGeometryContainsLocation , which will help you out with a single line of code. if ( GMSGeometryContainsLocation ( yourPoint , pathOfPolygon , YES )) { NSLog (@ "YES: you are in this polygon." ); } else { NSLog (@ "You do not

Cannot select from Google places autocomplete

匿名 (未验证) 提交于 2019-12-03 08:51:18
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing an ionic app to be run on Android. On a particular screen, I have a google maps and a search box. I have used the phone gap plugin for the google maps to get the native map instead of using Google Maps Javascript API as it is too slow. The search box is autocomplete to get places from google using the following code - input = document.getElementById 'search-input' autocomplete = new google.maps.places.Autocomplete(input) This turns the input field with autocomplete for places from google. The problem is that I am not able to

Put label on Google Maps polygon received by GeoJson data

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to put labels with information (or a div with a label) on polygons which are drawn by the below code fragment. Style attributes were applied successfully to the features (of type Polygon). Does anybody know how add text to this features which will be shown on the centre of the polygons? function handleGeoJson(data) { map.data.addGeoJson(data); map.data.setStyle(function(feature) { if (feature.getProperty('isColorful')) { color = feature.getProperty('color'); } return /** @type {google.maps.Data.StyleOptions} */( { fillColor : color,

Angular 2 agm library for google maps setting place by place id

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am implementing in a page a google map where a place id is passed to me, I then need to obtain such place id and load the map with that marker. I was going through the documentation but its not clear on how i can target the map object from the <agm-map> tag so that i can set the place id. Here is part of the code: public latitude: number; public longitude: number; public zoom: number; public placeid: string; constructor( private mapsAPILoader: MapsAPILoader, private ngZone: NgZone ) {} ngOnInit() { //set google maps defaults this.zoom = 4;

Composing two maps

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a function in Scala to compose two maps or is flatMap a sensible approach? scala> val caps: Map[String, Int] = Map(("A", 1), ("B", 2)) caps: Map[String,Int] = Map(A -> 1, B -> 2) scala> val lower: Map[Int, String] = Map((1, "a"), (2, "b")) lower: Map[Int,String] = Map(1 -> a, 2 -> b) scala> caps.flatMap { | case (cap, idx) => Map((cap, lower(idx))) | } res1: scala.collection.immutable.Map[String,String] = Map(A -> a, B -> b) Some syntactic sugar would be great! 回答1: If you know lower will contain keys for all the values in caps ,

Google Maps API: infoWindow flickers/closes automatically because of mouseout event

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm in the midst of creating polygons on a spiffy new project I am working on. The problem arises whenever you hover over the infoWindow, the mouseout event on the polygon fires. I don't want the mouseout event to fire unless the mouse moves outside of the polygon AND the infoWindow. Any ideas? Here's most of the relevant code. infoWindow = new google.maps.InfoWindow({ content: myContent }); var polygon = new google.maps.Polygon({ paths: polygonPath, strokeColor: data.color, strokeOpacity: 0.5, strokeWeight: 0, fillColor: data.color,

npm WARN react-native-maps@0.14.0 requires a peer of react@&gt;=15.4.0 but none was installed

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Problem I'm trying to install react-native-maps by Airbnb in my project. Installation instructions: airbnb/react-native-maps/installation When I run the following command in cmd: npm install react-native-maps --save This is what I get: `-- react-native-maps@0.14.0 npm WARN react-native-maps@0.14.0 requires a peer of react@>=15.4.0 but none was installed. Ignoring this if I proceed with further installation, and run the following command: react-native link react-native-maps This is what I get: Scanning 561 folders for symlinks in C:

Google Maps - Resource interpreted as Script but transferred with MIME type image/png

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I did some research and I couldn't find a post that was specific to the Google Maps V3 Javascript API, so I'm posting a new question. Please let me know if there is a more appropriate place for this question. My Issue: Without touching anything, my website, utilizing the Google Maps V3 Javascript API, started giving me this error: Resource interpreted as Script but transferred with MIME type image/png Refused to execute script from 'http://mt1.googleapis.com/vt?pb=!1m4!1m3!1i15!2i9148!3i11958!1m4!1m3!1i15!2…2m1!1e47!12m3!1e37!2m1!1ssmartmaps