Recently, Google Maps Android API v2 has been released, introducing MapFragment. It seems like a neat feature. However, I was wondering if it would be possible to use a MapView with the MapFragment to display a custom map instead of having a map loaded by the Google Play Services.
Looking at the documentation for MapFragment, I couldn't find any methods that would allow to attach a custom MapView. Moreover, it seems like you can never replace the GoogleMap that is used in the MapFragment.
For me this seems like, in order to be able to use custom maps, you cannot use the new maps API. I would appreciate the input of more knowledgeable people on this matter.
Edit: I would appreciate if someone could add the android-mapfragment tag, thereby creating it. Feel free to remove this edit once you have done so.
Related
I'm looking to create a circle menu for markers in my app that uses Google maps.
I've found this online example of what I am trying to do:http://demo-ee.com/index.php/examples/view/circle-menu-for-marker-with-mx-google-maps-for-expressionengine#
The problem is that this is for google maps in a webview, I'm looking to do this on Android.
Does anyone know if this is possible to achieve with google maps for Android and if it is, how much work would be involved to do it?
Is it possible to rebuild this example code in java to use in an Android app?
thanks
I put this as an answer and not as a comment, but I don't think you can achieve the same.
First of all, on android you don't have the "hover" callback for maps, you can only use the onMarkerClick listener.
You could try to build a custom infowindow (there are a few tutorial online but never followed, so I can't give you a trusted one, you have to try :( ) and check if the iw can be placed around your item. Unfortunately on android there is a limited set of functionalities, but to be honest, I would explore a different UX for that (cards, dialogfragment or other).
Check how google maps behaves when clicking on a place (a view scrollable from bottom with details).
You can also think about using a toolbar/expandingtoolbar
I understand there is a new method to apply google maps to a new application/activity in new versions of android studio. However I have not found anything about how to add a google map "widget" to a layout already created. Essentially I am trying to place a map in a layout to later be used as a fragment to another layout. I already have my API key but not sure how to implement this to my project. Any useful guides or hints towards this problem? thanks in advance!
You can find all the useful links pertaining to your question here. Since you have tagged/mentioned Android I am assuming your question is particularly for the Android platform. The latest version of the MAPS API is v2.
As far as placing a Google Map "Widget" goes, try using the MapFragment class which should be able to help (From what I understand).
A few recommended reads that should be very helpful:
1. MapFragment
2. MapView
..and last but not the least...
3. MapObjects
I'm looking for a way to use custom map tiles with the Google Map API V2 for Android.
I'm writing an application that will create it's own maps in real time with data that are comming from a robot.
The application need to show to the operator this map. The operator need to interact with this map, letting way points, etc.
I want to use the GoogleMap engine in order to do the same that in this page :
http://cdn.mikecouturier.com/blog.mikecouturier.com/tilesgenerator/index.html
The problem is, this guy use the [javascrip API]
But me, I want to use the [Android API]
Are there any way to use Custom tiles map on android with the GoogleMap Engine ?
Thank's a lot
PS : I'm already looking how to use ArcGIS. But, i prefer using API without paying license, thanks
By using GoogleMap.setMapType(MAP_TYPE_NONE) you will get an empty map.
Using e.g. the CanvasTileProvider I have described in the answer to this SO question you may then draw anything into the tiles.
I'm making an app that would use a Google map to show a lot of custom waypoints.
I know that you can add these markers in your code but there are far too many to do this manually. This map already exists but as far as I can tell from searching there doesn't seem to be a way to use this map.
I've been unable to find an example how to limit scrolling of android Google maps to defined coordinates or preferably not outside a ground overlay.
There are some examples of extending MapView and overriding the onScroll method, but the MapViewActivity which MapView needs, seems to be deprecated.
I am currently using GoogleMap class with SupportMapFragment, which seems not to support such a thing.
there is this question with an answer which is a bad hack and I rather not use it.
So is it possible?
Not possible without bad hacks as of 3.1.36. You may want to post a feature request on gmaps-api-issues if nobody requested that already.