Android :: Google Maps - MapView - Draw A Nice Flight Route Between 2 Points
Aug 1, 2010I wonder, how can I draw a nice flight route between 2 points on a google map's MapView? look at this: http://maps.forum.nu/gm_flight_path.html
View 6 RepliesI wonder, how can I draw a nice flight route between 2 points on a google map's MapView? look at this: http://maps.forum.nu/gm_flight_path.html
View 6 RepliesHow can I draw a nice flight route between 2 points on a google map's
MapView?
I am writing a application that needs to draw a "route" comprised of lots of GPS points (long+lat). The points are close together and don't follow roads, simply drawing a line between each point is ideal.
The current implementation I have is very slow as I am looping over all the GPS coordinates and creating a new Point and overlayitem in an itemized overlay. This takes around 20 seconds for it to load all of these points and draw them to the mapview. Is there a way in which I can construct a series of lines or point from the GPS coordinates and draw them onto the mapview?
Example of current implementation:
CODE:...................
I'm new to Android. and I parse a XML file from the following URL http://maps.google.com.tw/maps/api/directions/xml?origin=41.77732,-87. and I want to draw a route on Map, I found the information can help me to do this <polyline> <points>se~}FjtxuOKdEJ|JIpA</points> <levels>B??B</levels> </polyline> but how to use? help me, there are so many useless information when I search "Android polyline example" anyone can give me some short examples?
View 4 Replies View RelatedDoes anyone know how to grab FAA flight data to be displayed on google maps? I'm trying to create an android app but I can't seem to find where to get those feeds? There are so many flight tracker apps out there so there must be some available API right?
View 2 Replies View RelatedIn my android application I use this method in "draw" Overlay class for draw route on map. Can someone tell me if this method is good (in terms of performance) for route draw on map or I must to put code in Thread ??
I'm new to android.
public synchronized void draw(Canvas canvas, MapView mapView, boolean shadow) {
if (pointsAndTimes.isEmpty()) {
return;
}
Projection projection = mapView.getProjection();
Paint paint = new Paint();
paint.setARGB(250, 255, 0, 0);.............
Is there a way to display points of interest like gas stations, hospitals etc., using google maps?
View 5 Replies View RelatedIs there anyway to store a route or track using the google maps on the g1. I have a garmin that when on automatically stores your route and it can be saved and uploaded to the computer. It seems logical that this would be available on the g1, as it has all the capabilities already available, ie gps and maps. I can't find any mention of it or a way of doing this with existing software. It seems this would make for a very powerful tool if enabled. What about being able to sync routes and tracks with google earth? I have seen the new application "my maps editor" , but it only enables you to manually place lines or shapes.
View 5 Replies View RelatedBeen searching for the life of me for an app (or some way in Google Maps) to go to a spot on the map and draw a line down the street along a certain route and store the run to My Maps. Am I missing something?
View 2 Replies View RelatedIs it possible to move routes/directions from Google maps on your PC web browser to maps and navigation on your phone?
I have worked out how to export kml files from Google Maps on the PC.
It would have been nice to be able to save routes in My Maps (maybe you can, but I don't see how).
Also, is it possible to build a route with multiple destinations in Google Maps/Navigation on the phone?
Looking through the searches I can't seem to find anyone who has asked this question before and maybe this is being addressed with the 2.1 update. When I'm in the Google Maps application and I've entered my start and end point the route it give me is on a toll road or a highway I know to be very slow because of traffic. I know that when I'm using my computer for directions I can drag the line to add a via point / alternate route. Is there a way to do this in the current Google Maps on the HTC Droid Eris?
View 3 Replies View RelatedI was playing with Google Maps after the 2.1 update and on one occasion for a trip a screen came up that listed (3) different routes with the total miles and time for each route. One was for I295, one for I95, and one was for US202. Since then I can't seem to replicate that screen. Any answers? Suggestions? UPDATE: Found the answer. After selecting Navigate for a route, click Menu and a screen will come up with (3) symbols on the bottom. Left most one is the Symbol for Navigate, the symbol with a couple of arrows is the one to PRESS. This will give alternate route info that you can select. UPDATE AGAIN When I tried again, the option I mentioned above was grayed out and no longer works. I'm not sure what is going on.
View 7 Replies View RelatedI am looking for a way to overlay a route in google maps.
What I want is to take this map Greenways Oak Ridge Google map and get it to my google My Maps. Then I can pull it up in Maps and use my location to see where I am in relation to where I need to be in case I want to take a different route to need to shorted the ride due to darkness.
Most rides I do I can find these maps but cant do anything with them.
I'm trying to develop an application which display the locations of contacts on a map (a Msn-like but for geo-localisation). I search to display a route between my own location and a contact location I want to join but I find yet no solution to do this. In the Android API and Maps add-on API I just find classes to display and listen Location, Distance, GeoPoint, etc., but no possibility to display a route between two points. Is it possible or not provided by the API?
View 7 Replies View RelatedHow to showActivity which will display route between two points.
This will start installed map application on android phone.
I can able to show the route between two geo points in android using google map.Now i want to know how to guide the user like turn right ,take left like wise should display message. How can we achieve this?
View 1 Replies View RelatedI have a mapview where I want to track the user's current location. GPS as well as 'use wireless networks' is activated in my phone settings.
Nevertheless, since I'm indoor I don't get a GPS fix, therefore the location is determined via network; wifi spot is available.
I have the Google Maps app running as well as my application running.
Strangely, the current location differes between Google Maps and my application, where the Google Maps is very accurate while in my app the location is somehow off a few 100 meters.
In my application I basically do the following (for debugging purposes now):
1) initially place one marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
2) initially place another marker on the map: geopoint retrieved via locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
This will put the last known locations of both providers onto the map (eventually last known from outside my app).
3) then for the regular updates (since I don't get a GPS fix anyway indoor here), I do:
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, baseLocationListener);
You can see for the frequency and distance I pass the 0 param in both cases.
In the app manifest, the following permissions are granted:
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_MOCK_LOCATION
Actually my baseLocationListener does get called, which I see in the log, but the updated location is somehow the same as the last known current position (of LocationManager.NETWORK_PROVIDER), same lat/lng.
I thought maybe I overlooked something or missed a parameter or setting, or my code has a bug. Therefore I installed some other (3 in total) LBS apps from the Android market that also show the current user's location. The current locations displayed in those apps are equals to the one in my application - and they're all some 100 meters off - but at least all the same.
See the screenshot here:
http://img33.imageshack.us/img33/8679/mapproblem.png
Now I am wondering:
1) as I understand, getLastKnowLocation is system-wide and not app-wide, why are there differences between the location in Google maps and all the other apps?
2) does Google Maps not update the lastKnownLocation of a provider?
3) does Google Maps use a different custom location provider (i.e. due to licensing reasons) other than GPS_PROVIDER or NETWORK_PROVIDER as they are in the SDK?
4) how do achieve the same accurate result with the NETWORK_PROVIDER like Google Maps does?
Before I updated to android 2.2 and updated to latest Googlemaps the navigation was perfect. It calculated the route in seconds and was a joy to use. Since the updates, it is taking ages to calculate route, so long in fact that I exit the programme and start again, and then I just give up and dig out my atlas.
View 2 Replies View RelatedIt seems that the problem is in the data quality of the different map provider that are used for Google Maps and MapView in SDK, which differ.
The map tiles coordinates don't seem to be very accurate, just like in the public google maps web api / tiles.
See this screenshot for an example, where I pinned the same geo point. http://img339.imageshack.us/i/gmaps2.png/
The map using the public map api is off a few hundred meters. Seems that we just have to live with it.
CODE:................
I'm writing an app that shows in google maps pipes and valves(lines and points). For that i've two classes.
One extends from ItemizedOverlay, and i add to map overlay one for each category of valve, and each one can have more than one item.
The second extends from Overlay, and in the draw method y draw the line with the method drawline of the canvas.
The problem i've is that the lines are drawn over the ItemizedOverlay items, no matter the order i add them to the mapView.getOverlays().
I want the lines on the bottom of all overlays. is there a way to do that.
Frustrating - but apparently the capability is I can customize a route online with Google Maps, save it to my maps and send it to the phone but it sends the static map.Ridiculously, all this power and I can't take those directions from the PC and turn them into turn by turn directions on the phone.
View 3 Replies View RelatedDo anybody know how to draw path between two points on Map?
I need to draw a line, from one point to other...
I found one link (http://csie-tw.blogspot.com/2009/06/android-driving- direction-route-path.html) about this, but itīs not works well.
I would like to draw a curve(an arc) connecting three points in my screen PointA = (480,46) PointB = (160,137) PointC = (0,228) How to draw the curve using Android APIs ?
View 7 Replies View RelatedI have two OverlayItem's on a MapView. How can I draw a route between the two geopoints?
View 2 Replies View RelatedI'm making a game for android where I need to draw a lot of points that change position every frame. I use the ndk to get faster processing performance of the math/physics section of the game, so I need to use OpenGL to get the fastest performance. Right now, I make a texture every frame out of an array that holds the colors of every pixel. I am only able to get ~10 frames per second with this method. Is there anyway I could speed this up? ...
View 2 Replies View Relatedi am new to android development. I got an error when write the code "import com.google.android.maps.MapView; in eclipse. The error is "The import com.google can not be resolved."
View 2 Replies View RelatedI would like to draw a curve connecting three points in my screen
PointA = (480,46)
PointB = (160,137)
PointC = (0,228)
How to draw the curve using Android APIs?
import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.view.ViewGroup;
import android.widget.*;
import com.google.android.maps.MapView;
public class MapView extends MapActivity{
/** Called when the activity is first created. */
LinearLayout linearLayout;
MapView mapView;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
MapController mapController = mapView.getController();
}
}
I'm working on a project to display a route in a MapView based on current location from GPS Provider. I'm able to draw the path between two points but the problem starts when the location changes to a new point causing the draw path to erase. Basically my Location Listener saves the current Geopoint and sets the new Geopoint location and after that it starts the overlay to draw a path based on those two points. I think an option could be saving the coordinates to a database and then pulling the information from there to draw the path.
private class MyLocationListener implements LocationListener {
public void onLocationChanged(Location location) {
Toast.makeText(getBaseContext(), "Tracking device..",
Toast.LENGTH_SHORT).show();
[code]....
I have been able to draw a map using 'MapActivity' class. Am unable to render 3D graphics on the Map. Is there any way to draw something on the foreground with the Map as the background?
View 2 Replies View Related