google-maps-api-2

How to find if a geo-location is on a road between two points?

痴心易碎 提交于 2020-01-16 18:34:37
问题 I am a student working on an android application related to navigation trying to learn android programming. The application needs to search the geo-locations (latitude,longitude) among the ones available and find out which ones fall along the route the user is travelling. For example, if the user is travelling from 37.422,-122.084058 to 37.422,-122.084058, then I should be able to search the points that fall along this route from the set of points that I have. How do I do that? I am getting

How to find if a geo-location is on a road between two points?

给你一囗甜甜゛ 提交于 2020-01-16 18:34:13
问题 I am a student working on an android application related to navigation trying to learn android programming. The application needs to search the geo-locations (latitude,longitude) among the ones available and find out which ones fall along the route the user is travelling. For example, if the user is travelling from 37.422,-122.084058 to 37.422,-122.084058, then I should be able to search the points that fall along this route from the set of points that I have. How do I do that? I am getting

How to get the coordinates of the blue dot in android maps v2

99封情书 提交于 2020-01-15 12:33:36
问题 On a Map I want to show the path direction from my location to a certain location. I have implemented the logic for drawing the path on the map already, but I have issues determinate my current location. I have being using new LocationClient for retrieving my current location just like it is described in this article: http://developer.android.com/training/location/retrieve-current.html , and i have read somewhere that the new maps API v2 is using the same technique for getting my location.

How to get the coordinates of the blue dot in android maps v2

喜夏-厌秋 提交于 2020-01-15 12:31:12
问题 On a Map I want to show the path direction from my location to a certain location. I have implemented the logic for drawing the path on the map already, but I have issues determinate my current location. I have being using new LocationClient for retrieving my current location just like it is described in this article: http://developer.android.com/training/location/retrieve-current.html , and i have read somewhere that the new maps API v2 is using the same technique for getting my location.

Move camera position to fit LatLngBounds with regard to marker height

会有一股神秘感。 提交于 2020-01-13 10:29:07
问题 I want to move camera to position to fit LatLngBounds with regard to marker height. So far I'm able for fit the anchors of markers with this code: LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (Marker marker : markerList) { builder.include(marker.getPosition()); } LatLngBounds bounds = builder.build(); int padding = getActivity().getResources().getDimensionPixelSize(R.dimen.home_map_padding); // offset from edges of the map in pixels cameraUpdate = CameraUpdateFactory

How to display a moving track on Android device

风格不统一 提交于 2020-01-12 02:28:47
问题 I want to plot my track using GPS on an Android device. I have no problem displaying a completed route but am finding it difficult to show the track as I'm moving. So far, I've found 2 different ways to do that but neither are particularly satisfactory. METHOD 1 PolylineOptions track = new PolylineOptions(); Polyline poly; while (moving) { Latlng coord = new LatLng(lat,lng); // from LocationListener track.add(coord); if (poly != null) { poly.remove(); } poly = map.addPolyline(track); } ie

How to animate google map v2 marker on the polyline path?

你离开我真会死。 提交于 2020-01-10 02:59:27
问题 I already build an app using google maps V2 and put 2 markers on the map. First marker is to get user current location, and the second marker is user destination location. And then I add decodePoly method to draw line between those markers. I also add method to give user information about durations,start address and destination address using alert dialog. So, when I click the second marker, i want to animate that marker to "move" to first marker. But my problem is, the second marker is not

Google Map Direction API Return Zero Results Swift

China☆狼群 提交于 2020-01-06 20:16:31
问题 My App using Google Maps Direction API to draw route between any two positions (origin - direction positions)user pin it. I used the API like this way: https://maps.googleapis.com/maps/api/directions/json?origin=(fromLat),(fromLng)&destination=(toLat),(toLng)&mode=(travelMode)&departure_time=now&alternatives=true&language=(lang) The problem is sometimes the response return Zero Results, like this : { "geocoded_waypoints": [ {}, {} ], "routes": [], "status": "ZERO_RESULTS" } I searched a lot

ensure location accuracy and track user on Google map

和自甴很熟 提交于 2020-01-06 12:43:25
问题 My android application function is to track the user location when it walk/run or when he never moves(then location should not change)First, the location is inaccurate and red marker keeps popping out on the map even if i never move. the position where it pops out is also inaccurate. For those who did similar location tracking app before, the blue dot should be the same place as the latest red marker right? but my blue dot is always away most of the time. red marker shows a more accurate

How to get the KML data from a GGeoXml object

白昼怎懂夜的黑 提交于 2020-01-05 04:48:20
问题 I load an KML file into a google map object using the following code: map = new GMap2(document.getElementById("map_canvas")); geoXml = new GGeoXml(kml); GEvent.addListener(geoXml, "load", function() { geoXml.gotoDefaultViewport(map); // I would like to read the KML contents here }); map.addOverlay(geoXml); // ... I would like to read the placemarks from the KML file and display them in a list. I know that the information I need is being transferred to the browser but I don't know how to