I want to place markers on the map.
I want to use the standard Google Maps icons for markers.
how do I use them? I don't want to create my own icons.
I'm developing for Android.
in the documentation they tell me to create a class that overrides ItemizedOverlay but in the constructor I'm asked to provide a drawable object.
how do I point to the standard Google Maps ones?
thanks.
this sample project helps you.
how to add a itemizedOverlay and when you click on it. it will show an balloon to display what you need..
Those icons are not available from the Google Maps add-on for Android -- or, at least, they are not documented. Perhaps there is a way you can obtain them for legal download through Google Maps for the Web.
A simple solution can be found here: https://github.com/jgilfelt/android-mapviewballoons/
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 need to make an Android app where the users have an option to draw a polyline on Google Maps and when the touch is removed, then do some action with the plotted polyline. Drawing and performing action is secondary. But the question is how could I achieve this?
Is there any predefined drawing tool (something like http://googlegeodevelopers.blogspot.in/2011/11/make-your-map-interactive-with-shape.html for JavaScript) to be used in google maps, or do I need to go with customization? Please suggest, or provide any links.
And can we extract the points to compare them with the ideal answer which was to be traced?
But the question is how could I achieve this?
With code. ;)
do I need to go with customization?
Yes. You would have to code all the functionality yourself. AFAIK there is no library that does that and of course Google Maps Android API v2 doesn't (and most probably won't) provide such functionality because it is too specific. I still think this would make a pretty useful library.
And can we extract the points to compare them with the ideal answer which was to be traced?
Yes. That would be simple after you are done with everything else.
Polyline polyline = ...
List<LatLng> extractedPoints = polyline.getPoints();
Simply use google maps api Google map API v2 following link might help you with the code.
code reference
We added about 200 new markers in the MapView.
Now the app stucks and you cant use the MapView.
I heared about MarkerClusterer but did not found any more inforamation how to use MarkerClusterer with Android...or are there better solutions?
Can anyone give me a link or write a little turorial?
Thanks :)
You can have a look at this example Android project https://github.com/igorab/ManyPinsProject
It shows limited amount of markers depending on MapView zoom level.
Here is tutorial from Google https://developers.google.com/maps/articles/toomanymarkers
As #CommonsWare said it is only for JavaScript version or GoogleMaps, but may be you can find something useful there. For example, they have a link to MarkerClusterer js source code. Maybe you can find a way to adopt it to Android.
You can use this library – Android MapView Balloons. This project provides an easy way to annotate map overlay items with a simple information balloon when using the Android Maps.
well i was able to find loads of information on how to create my own custom overlays onto the map, but none on how can i use the ones that google already has put on.
I basically want to use all the overlays of one type (say the Hotel overlay icons) and get their geoPoints and then use them in any way i want...right now i have to manually get the geoPoint of every such hotel overlay and then use them, which is pretty painful considering google has already marked them out...but i have no idea how can i use them..
Any idea how can i do this?
Those are not available to Android SDK developers -- they are part of the proprietary Google Maps application. The only pre-built overlay available to SDK developers is MyLocationOverlay.
1.Is it possible to NOT use Google Maps in Android?
2. Can we use Navteq maps?
3. What will it take to write such an application?
4. Do we have to come up with our own version of MapView?
Pointers and links that can answer these questions and help me get started on 4. are welcome.
Thanks.
Most likely NDrive use NAVTEQ's map, at least in some areas
OSMDroid provides an opensource alternative to Google Maps. They have their own implementation of MapView (similar to Google's implementation).
http://code.google.com/p/osmdroid/
there are some applications on the market that are custom maps, i.e. YandexMaps, OpenStreetMap & others
I believe they had written their own map class implementation, not a MapView one.