maps

Google Maps v3 map.getBounds().containsLatLng is not a function

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How do i set the "setMap" function here to port this code to v3? Or port it generally to v3... // map recenter, if element is outside the mapscreen while ((!map.getBounds().containsLatLng(marker.getPosition())) & (showAllCategoryElements == 0)) { var newCenterPointLng = (map.getBounds().getCenter().lng() + marker.getPosition().lng()) / 2; var newCenterPointLat = (map.getBounds().getCenter().lat() + marker.getPosition().lat()) / 2; map.panTo(new google.maps.LatLng(newCenterPointLat, newCenterPointLng)); map.setCenter(new google.maps.LatLng

Interactive layers in Bing map control for Silverlight 4 and Windows Phone 7

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When using the Bing map control my app adds an overlay on which to draw position markers as ellipses. Each ellipse is wired to a tap handler which works as expected in the WP7 emulator. Sadly this does not seem to be the case on HTC hardware - the map itself seems to grab all input. Does anyone know how I can fix this. Better still is there a working example with interactive layers? Thx++ 回答1: If you create a new windows phone 7.1 silverlight application using the default template in Visual Studio 2010, then just copy the following into the

Map Markers Not Displaying (JavaScript/Google Maps API V3)

匿名 (未验证) 提交于 2019-12-03 02:27:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm having trouble getting map markers to display using Google Maps API v3. I'm attempting to keep them all in a single array, to make displaying a large amount relatively simple. Currently, the map loads fine, but throws the error Uncaught TypeError: Object #<Object> has no method 'setValues' when attempting to draw the markers. The error repeats with each iteration run by the setTimeout() . Any recommendations will be greatly appreciated. This is the JavaScript used: var map; var markers = [ [ 45.768366, -108.5975760, 'Fitness 19' ], [ 45

Google Maps v2 - set both my location and zoom in

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: My question is, does anyone know how to set google maps up, to open up both my location and in a zoomed in view? Currently, the main view opens up to Africa, all the way zoomed out. And so I have been searching for days now, and all I can find are: 1) You cannot animate two things (like zoom in and go to my location) in one google map? So if I can figure out how to set the zoom before I set the animate, then this problem would be solved. That tend tend to be the issue, you can change one, but not both. 2) I have found other classes that

Google Maps - “App won&#039;t run unless you update Google Play services”

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm just trying to run the simple Google Maps tutorial here: https://developers.google.com/maps/documentation/android/start I'm running my app on my Nexus 4, and I receive the "update Google Play services" message with an Update button. When I click the Update button, it takes me to the Google Play services app on the Play Store, but it appears that it's updated to the latest version. Is there anything else I might be missing? Android Manifest file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com

What Country is the User Currently In?

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've looked around a bit on stackoverflow and Google Groups and haven't really found an answer for this exact question. I simply want to be able to know what country the user of an Android phone is currently in. I assume the TelephonyManager doesn't work if the user is using wifi only. Is this true? We've tried passing the user's current latitude and longitude using android.location.Geocoder, but it's really flaky. It will frequently return empty results. Sometimes we can keep asking it and it will eventually return results, but it's really

Clojure, merging two array of maps

匿名 (未验证) 提交于 2019-12-03 02:26:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have two arrays of maps 1st is [{:a 1 :b 2 :d 6} {:a 2 :b 2} {:a 7 :b 7}] 2nd is [{:a 3 :c 3 :e 9 :y 7} {:a 2 :b 6 :c 8}] depending on the value of a i.e. if its matches in 2nd array the '2nd map' should be merged with '1st map' and the resultant array of maps should be Res should be [{:a 1 :b 2 :d 6} {:a 2 :b 6 :c 8} {:a 7 :b 7} {:a 3 :c 3 :e 9 :y 7}] Can anyone help me on this. Thanks in advance. 回答1: Here you go: user> (def xs [{:a 1 :b 2 :d 6} {:a 2 :b 2} {:a 7 :b 7}]) #'user/xs user> (def ys [{:a 3 :c 3 :e 9 :y 7} {:a 2 :b 6 :c 8}]) #

android: Binary XML file line #9: error inflating class fragment

匿名 (未验证) 提交于 2019-12-03 02:25:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was trying to show the maps in android application. I am using map V2. But the error "Binary XML file line #9: error inflating class fragment" is thrown. The app is crashed on launch. Below is my code. Please help me in solving this stuff MainActivity.Java package com.example.googlemapsv2; import android.os.Bundle; import android.support.v4.app.FragmentActivity; public class MainActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout

patch: Only garbage was found in the patch input

匿名 (未验证) 提交于 2019-12-03 02:24:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I produced a diff.txt file with the command (executed from ~): diff -r /full/path/to/directory/A /full/path/to/directory/B > diff.txt The generated diff file looks good. Now I run (always from ~) patch -p0 <diff.txt or I also tried: patch <diff.txt I would expect it to apply the changes to the files in /full/path/to/directory/A so that after the operation they will be identical to those in /full/path/to/directory/B But it only says: * Only garbage was found in the patch input. What am I missing? EDIT: Here is the whole diff file: diff /media

Google Maps API: Bézier curve polyline wrap

匿名 (未验证) 提交于 2019-12-03 02:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: By using the Bezier curve polyline draw function provided by nicoabie I was able to draw a curved line from one point on the map to another. The problem is that this function does not take in to account the fact that when a point is past the maximum coordinate mark it is not necessarily on the other side of the map, since it wraps around. For example, drawing a curved line from Seattle to Tokyo. A regular polyline would go across the Pacific ocean, but the the curved line draws east across the whole globe. geodesic: true does not work in