How can I implement MKMapView heading features in Android with Google Maps APIs?
Screenshot: iOS MKMapView with heading example
I would use sensors to the orientation of the map and display the map as if you were a navigation mode.
Try using MapView which is just one of the several Map Objects.
A View which displays a map (with data obtained from the Google Maps
service). When focused, it will capture keypresses and touch gestures
to move the map.
Users of this class must forward all the life cycle methods from the
Activity or Fragment containing this view to the corresponding ones in
this class.
For actual codes checkout the Google maps android samples in Github.
Related
I want to incorporate a google map in my online grocery system in my android application in java. Which activity should I use to incorporate it. I am just starting my project to build. I am confused that from which activity should I start?
I have make an app which uses google map separately through google map activity. But this time, I want to add it in a huge project. Can I use main activity for incorporating google maps?
Firstly, you should make single activity apps and display different fragments in your app. For example, you might have a login fragment and a groceries fragment (that displays all groceries or/and groceries filters), etc. You should put your Google map MapView in a fragment or use a premade Google maps fragment.
Remember MapView has its lifecycle that you will have to override. Other than that using MapView is pretty straightforward.
But if you insist on using activities you can use the MapActivity class, which is a subclass of Activity. This class provides a framework for displaying a map, and you can customize the appearance and behavior of the map using the MapView class.
You also need to implement the OnMapReadyCallback interface and override the onMapReady() method to set up the map and add any markers or other features to it.
I would recommend reading the documentation and watching a few videos on the topic.
MAPS DOCUMENTATION:
https://developers.google.com/maps/documentation/android-sdk/start
I am trying to reproduce the same satellite view as the Google Maps application on Android.
This is a picture of the satellite view (it shows the main streets/roads highlighted) in Maps application: http://i.stack.imgur.com/YCkLL.png
But using the layers of the Google Maps API i can not achieve the same result.
I want to show the main street/routes roads highlighted like the Maps application. I search all the possible options but i did not found nothing that fit my needs.
Is there is something i am missing? Or i have to develop a new layer to show the roads like that?
Thanks!
did you try to use the "HYBRID" map type?
myMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
it should fix your problem
I heard that Google is using only PublicApi's for their apps. However I supect this to be wrong if I have a look at the official "GoogleMaps" App.
In GoogleMaps V2 there is only a "setMyLocationEnabled" Method. It shows a blue dot (with accuracy) but WITHOUT a Direction. There seems to be NO Api to do the same, and you have to emulate all the behavior (e.g. register LocationListener, place a Location Marker drawable, handle bearing and rotation correctly and click Events on the "myLocation" Button).
Same applies to Marker Windows. If you set a Title to a Marker it is shown automatically on Click and you can additionally show an "InfoWindow" (which is basically a layout rendered as bmp, so no Click-Events, Scrolling etc).
In The official App there is a Window coming from the bottom of the Screen, expandable, clickable and nice looking. You are able to emulate this with much effort, too, but again no public API for it.
Next is the Master/Detail Layout Flow of the official App. I cannot get it to work, because the Maps is eating all Events (no chance to apply an OnTouchListener to the GoogleMap object.
So my question:
Is google really using public API's ONLY and implemented any GoogleMaps feature around it, or is it just using private API's? Am I just lazy or is it just a crappy API that really could give the user more freedom?
Google Maps application doesn't use Google Maps Android API v2. What was meant by public APIs was probably Directions, Places, etc.
I would like to implement an indoor positioning system on an Android device (galaxy tab)
I have a picture of the map I intend to use. However I am not sure what is the right way to do
this.
I want my application to have some of the abilities of google maps, such as zoom and scroll, and the ability to use overlay items.
However, as I understand, it is not possible to use google maps with a custom map.
What is the right way to do this? Is there a library which enables us to zoom and scroll images/maps?
Can you use the overlay package without google maps? If not, how can you present a location in such a map?
Thanks in advance
Ariel
Have a look at these two Android apps:
MapCalibrator by Martin Ohlin
Custom Maps by Marlo Teittinen
To develop a full-blown indoor navigation system, have a look at these platforms:
http://insiteo.com/
http://cloudmade.com/
Googling aroud for "indoor positioning" and/or "indoor navigation" you will find many more solutions.
If it was a large location - say a shopping centre - you could possibly map it out in a KML layer and add it to google maps but I'm not sure how well that would work. Google maps does not allow the user to zoom in very far - probably not far enough for your needs if you want to map down to the room level.
Here is a tutorial on "Map your business inside and out".
The google maps API v3 supports "custom maps"
Discussions from the v3 group
one example from a search.
I have a com.google.android.maps.MapView in my application. When using the normal view I do not get any data in Jerusalem and its surroundings. When scrolling to the same location with the Maps app or the maps.google.com webpage the place is rich with mapdata.
Is there a (known) difference between the Map API view and the Google view of mapdata that I am unaware of?
The Google APIs Add-On for Android is a proprietary product. As such, there is no real public documentation on what data is provided by the various layers (e.g., satellite), just that the layers exist. Moreover, there is no real configuration for what gets displayed on the various layers -- all you can do is toggle the layers on and off and control gross aspects like zoom levels.