Is there anyway to simulate google map on android app? - android

I am doing the project about map navigation. Currently I work fine with the mapview with GPS and singal route directing. But I can not find anyway that, show the all possible choices on the map, like google map on web.
For example I like to search what restaurants are around my area, so I type "Restaurant" in search bar and search it, the map shold display my current position (I have done this) and also show all the possible restaurants that near my area. After that I pick up one restaurant, and the map will draw the route from my position to the restaurant (I have done this too)
I have spent many time search on internet but couldn't find any critical example explain about this, is there any tutorial I can refer to?
Should I use "webview" to directly show the google map web page on app?
I also meet other problem, I use the way below to directe my route on map, it suppose to draw the route on my app, but insted of that the phone will directly oepn google map and drawn the route on google map, am I do this wrong? Is there any better way?
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setData(
Uri.parse("http://maps.google.com/maps?f=d&saddr="
+GeoPointToString(fromGeoPoint)
+"&daddr="
+GeoPointToString(toGeoPoint)
+"&hl=cn")
);
startActivity(intent);
I am the very new beginner of android programming, hope this is not a silly question, wish you can help me. thanks

If you're trying to make an app using Google Maps, you should use the Google Maps API!
https://developers.google.com/maps/documentation/android/
You should be able to download it via your SDK manager in eclipse, or manually install it. I'm using it at work right now, but be wary that you cannot make a commercial app for navigation using these maps.

Related

Is it possible to hide Map but show only markers Android Google Maps

I am trying to create a Location based augmented reality app which plots marker on top of the camera view.
Mose of the libraries and tutorials are outdated and they are 4+ years old also not stable. Below is the link to things which i have tried and failed.
Links to libraries
Link to tutorial
Link to stack
Im trying to create something like below image which is an iOS app developed using HDAugmentedReality which is very stable and does not overlap.
Since i could not find any library I'm planing to use Google Maps, It rotates according to camera with simulates AR. So i am planning to show only the markers and hide the Google Map View. If this is possible i can easily create an Location based AR app..
Is it possible to hide Maps but show Markers or is there any library which i missed? Thanks in advance .
I believe you can't use the Markers without showing it on Maps. The main purpose of it is to identify the location on a map. My suggestion would be for you to use your own custom overlay for the marked items you'll show.
Check out the Sun Surveyor, its not similar to what you'll do, but the idea of overlaying the information seems plausible (as indicated on the tutorial link you provided).

Custom map for my android app

I want to create a custom map for my app.
the things i want are:
it will be a custom map designed by us for a event location(not google map).
all the locations will be displayed on the map like google markers.
just like google map i want users to select a location and get direction from his/her current location to selected destination within that area(my main concern).
Are there any possible solutions to this? Any links, suggestions to start with please let me know.
This is very imp. for me..thank you.
I suggest you look at the OpenStreetMap project. They have all the components you need but it is not going to be a simple task for an area of any size

How to create GeoTagging image / location tagging application for android with google maps using eclipse with ADT

Hello my name is James,
I am self-learning how to develop android applications, I have designed few basic apps – to name a few calculator app, notepad, percentage calculator for android. After developing few small basic apps, I am planning on making more advance apps, I am planning on creating an app that allows the user to tag their location on google map or geotag images using the application, which will only be visible to them. For example, the user can tag location to a map and later on get directions to that location or take an image of a location and geotag it to the map and add some sort of description to it.
I have been searching on google for some time now, on how I can go about designing this app but I haven’t really found any tutorial / guides how to implement the image geotagging / location tagging to google map.
Please can someone give me some guide, something to read upon or maybe correct me if am not searching for the right materials.
So far, I have carried out searches including:
How to add google maps to my android application (I found a good guide for this and I understand how I can do this)
How to implement geotagging on your android application (Haven’t found any useful material apart from few applications released on play store)
How to implement location tagging (Haven’t found any useful material for this either)
I found a video on YouTube where the person has designed a similar app that I am planning on doing http://www.youtube.com/watch?v=_V49bXXtnvU but other than I have only come across videos / guides that shows how to add google maps to your android application something like http://www.youtube.com/watch?v=awX5T-EwLPc
Thanks for your time.
I'm not sure if you found your answers already, but in case you or someone else is still looking:
- http://www.vogella.com/tutorials/AndroidGoogleMaps/article.html
I found that tutorial helpful in getting started with MapsActivity. If you are using Android Studio then just start a new project with the main activity selected as Map activity. This will start you off with a lot of the necessary code for starting the Google Maps API. It will walk you through how to get your google api key for your app.
Once you have that set up, then look at the several listeners that are available for the map. Some that you may want are Map.setOnMapLongClickListener, Map.setOnMarkerClickListener, Map.setOnMarkerDragListener. These will help you decide what to do with locations on the map.
Look at the Marker class to be used Google Map. You will set your tags/markers with this class. You can replace the default marker with your image if you like or create your own custom tag. https://developers.google.com/android/reference/com/google/android/gms/maps/model/Marker?hl=en
You can use LocationManager to get your current location. Here is a simple tutorial: http://javapapers.com/android/get-current-location-in-android/
If you plan on providing Camera within your app or get images from gallery, you should review the Camera Class :
http://developer.android.com/guide/topics/media/camera.html
and a simple tutorial:
http://www.tutorialspoint.com/android/android_camera.htm
I would add one feature at a time when starting your app project.
Create the map with working key and make sure it displays a map.
Then, add a marker on your current location (on an emulator, you will have to set the default location because it will not have gps).
Then, allow the user to add a marker by i.e long pressing on a map location.
Then, open a dialog box of choices when long pressing on map, i.e tag location, tag with custom tag, tag with camera image, etc.

Converting from google maps to open street maps (osmdroid)

I built my application using Google Maps and it is using:
-BalloonItemizedOverlay
-BalloonOverlayView
-ItemizedOverlay
and what it does:
-Displays multiple points on map, each one clickable and balloon appears with relative text + description.
-Displays and updates the marker/point of user's position.
The only reason I want to switch to Open Street Map is because I would like to use the feature "caching map tiles" (presaving maps) which as far as I have looked it up is not allowed with Google Maps.
Can someone help me convert my application thoroughly to use OSMdroid instead of GoogleMaps? Providing me with some guides (very few support for OSMdroid at the moment...)
I have already looked up a lot of codes but they mostly differ in comparison with Google Maps and I can't seem to get it all right. I have managed to display user's location on the map but adding BalloonItemizedOverlays and so on is a hassle.
Anyway just help me out in any way you can - proposals on how to do it, sites with guides, anything :)
Thanks
http://code.google.com/p/osmbonuspack/wiki/Tutorial_1
http://code.google.com/p/osmbonuspack/wiki/Tutorial_2
I think these two tutorials should get you started with Balloons and Customized Balloons
Itemized overlay with osmdroid is quite easy to use, you should give it a try and you will get the feel of it once you try it our.

Android, draw route on google map

In my android project I want to draw route on Google maps. I have coordinates of start and end points. On this points I get km-file from Google web service with points witch across route. For drawing parts of route I use instances of Overlay class. And this solution works, but very slowly. Are there another methods to do that? May be exists ability use built-in Google maps application or any another way?
Right, you can use the built-in google maps application via an intent like this:
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345"));
startActivity(intent);
see this question for more details
there's a tutorial for using KML here:
http://csie-tw.blogspot.com/2009/06/android-driving-direction-route-path.html
and some sample code here:
How to draw a path on a map using kml file?
it all looks like a lot of overly-complicated hard work - Google should provide API's for this instead.

Categories

Resources