maps

Marker is not adding properly while add through for loop

倾然丶 夕夏残阳落幕 提交于 2019-12-24 23:44:03
问题 Marker not properly adding through for loop When i give i=2 then it's loading 2nd marker otherwise it's just loading single marker Can you please tell me what could be the reason JSONObject jsonObject = new JSONObject(result); for (int i = 1; i <= jsonObject.length(); i++) { jsonObject = jsonObject.getJSONObject(Integer.toString(i)); Double lat = jsonObject.getDouble("latitude"); Double lon = jsonObject.getDouble("longitude"); int sno = jsonObject.getInt("sno"); Toast.makeText(getBaseContext(

Google MAPS waypoints

限于喜欢 提交于 2019-12-24 22:45:56
问题 I have a problem using waypoints in Google Maps: https://developers.google.com/maps/documentation/javascript/directions#DirectionsResults I want to add waypoints and get driving directions in the order I provide them, but google automatically optimize them... I send request with this code: var request = { origin: start, destination: end, waypoints: waypts, optimizeWaypoints: true, travelMode: google.maps.TravelMode.DRIVING }; and in my array (waypts) waypoints are ordered as they should be ..

How to get the list of applications suitable for routing from the user’s device?

女生的网名这么多〃 提交于 2019-12-24 20:31:29
问题 Is there any way to check if user has a certain app (google.maps, yandex.maps or native maps) on his/her device to make a list of apps suitable for routing? 回答1: You can check if user has this apps on device (google.maps, yandex.maps or native maps) using URL scheme. for Google maps: let appURL = URL(string: “comgooglemaps://”) if UIApplication.shared.canOpenURL(appURL!) { // code for open URL print(“Can Open URL”) } 来源: https://stackoverflow.com/questions/53852623/how-to-get-the-list-of

Android Maps app not finding the correct MapView

久未见 提交于 2019-12-24 19:23:36
问题 I have made an app that uses Google Android Maps API V2 and I have followed every step in the guide provided by Google but it doesn't work unfortunely and it crashes every time I try to start it up. The issue seem so be that it is not looking for com.google.android.gms.maps.MapView which is the MapView for the Android Maps API V2 but it's instead looking for com.google.android.maps.MapView which is the MapView for the Android Maps API V1 and I'm wondering how do I change that? 03-04 00:26:51

Merge maps in java

扶醉桌前 提交于 2019-12-24 18:11:08
问题 What i'm trying to do is pretty simple.I want to merge two maps. Say map1={(1,"one"),(2,"two"),(3,"three"); map2={(1,"onetoo"),(4,"four")}; if i follow this-> map3.putall(map1); map3.putall(map2); then value of 1 is onetoo but when i follow the reverse it is one. is there anyway i could change that?what i mean is that java overwrites and puts only the latest value for a key. i.e if onetoo was added after one (in their respective maps)then no matter what the order of putall calls to map3 the

Working with Geolocation and Google Maps API [HELP]

风流意气都作罢 提交于 2019-12-24 17:59:12
问题 I'm new to the mobile development world and right now I'm building an app that uses jQuery mobile and PhoneGap. Here's my logic: I have a table that contains the users and their addresses. I grab the user address and pass it trough the maps API to catch the location. But I'm doing this for every single record and sometimes the API breaks because the number of simultaneous requests. How can I know what users are closest to me without running it through the maps API? Thanks a lot! 回答1: Rafael,

Working with Geolocation and Google Maps API [HELP]

送分小仙女□ 提交于 2019-12-24 17:59:10
问题 I'm new to the mobile development world and right now I'm building an app that uses jQuery mobile and PhoneGap. Here's my logic: I have a table that contains the users and their addresses. I grab the user address and pass it trough the maps API to catch the location. But I'm doing this for every single record and sometimes the API breaks because the number of simultaneous requests. How can I know what users are closest to me without running it through the maps API? Thanks a lot! 回答1: Rafael,

Google Maps Polygon Incorrectly Rendered

耗尽温柔 提交于 2019-12-24 17:43:37
问题 I am trying to draw a semi-circle in google maps using Geodesics Points between 2 latitude and longitudes. I found a place that had exactly what I needed: http://maps.forum.nu/temp/gm_bearing.html It was using the API V2 and I need the V3. So I converted it. The problem im having is that the semi-circle isnt being drawn correctly and i cant figure out why. This is what happens when the semi-circle is drawn. But when I zoom out or I make the semi-circle smaller it looks fine. I have reproduced

Android: Is there a way to get timezone for Country name?

你。 提交于 2019-12-24 17:25:44
问题 Is there a way to get the Timezone given the name of a Country? I use getCountryName() in Maps to get the name of the Country. 回答1: This seems difficult considering that some countries span over multiple time zones. 来源: https://stackoverflow.com/questions/4096014/android-is-there-a-way-to-get-timezone-for-country-name

How to let users choose their town, so my app can know coordinates

萝らか妹 提交于 2019-12-24 17:06:17
问题 I am starting my first Open Source ASP.NET project in C#. Data that Web app is going to show is in close relation with geographic coordinates of towns. Now I want to implement user interface where user of web app can choose a desired town and submit form, and behind scene i want to get coordinates of chosen town, so I can make calculations. Now I wondering is there some free services or library, which can I implement to get wanted results? Does Google's Maps provide this feature or there is