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.
Related
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.
How to add a polyline to google map in android above street/area name?
I think this is not possible in an easy way due to how google maps API handles the "background".
If you set the background to normal or hybrid, the map is drawn as a background either in road view like your screenshot or in satellite view if hybrid is selected.
Then all the users features are drawn (and eventually overlays, lines, poligons, then points and lastly, street names. You can't really change this, but you could do a trick:
- Use just the satellite view (so no roads will be added).
- Remove the google background and add an alternative one (there are different services like Open Street Map, Mapnik ecc that allows it).
Following the second choice could also allow to add googlemaps background from web api, but I really don't advice to do it, since you are downloading tiles in a non standard way for google.
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.
We're building an application where the user has the ability to overlay lots of geospatial data on top of a map. The google apis have terrific support for this; allowing vector features to be drawn as well as a tileoverlay class.
The downside is that their map is ALWAYS the basemap. The only way this is a downside is if a user says "i dont want that" or something. I don't think that's likely, but it's possible. I'm curious if there's a way to turn the google tiles portion off, or tell it to hide it's google tiles, and tell it to stop trying to get tiles from google? I want to use the api, but be able to not show the google map, do-able?
Have you tried setting the map type to MAP_TYPE_NONE?
I'm trying to make an Android application that will display a map of a local area only (a big building and surroundings), and I want to know if it's possible to take the Google Maps API and modify the map it's using to be the map I made myself.
If this cannot be done, I will ask my question in a broader sense: How can I create an interactive map app for Android that will use an image made by myself?
I want to know if it's possible to take the Google Maps API and modify the map it's using to be the map I made myself.
Not through the Google Maps add-on for Android.
How can I create an interactive map app for Android that will use an image made by myself?
The same way you implement 2D games: draw it yourself, probably using the Canvas 2D API.
It is possible that there is a third-party library for handling this. For example, you might peek at the OSMDroid code, as that is open source and handles map tiles coming from OpenStreetMap. In theory, one should be able to create a general purpose "map" widget with pluggable tile sources, where the widget handles pan, zoom, etc.
I note that you have the app-inventor tag on this question -- App Inventor is going to be incapable of doing this any time soon.