myLocationOverlay change the marker

Thx @CommonsWare, you led me in the right direction. Spent quite a wile twiddling with this. The Javadoc on http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/MyLocationOverlay.html is just wrong (or outdated) and messes with your brain where it says: drawMyLocation Also, if the user’s position moves near the edge of the screen, and we’ve been given a MapController in our constructor, … Read more

Add Marker on Android Google Map via touch or tap

Try using new Google Map API v2. It’s easy to use and you can add a marker on tap like this: map.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Override public void onMapClick(LatLng point) { allPoints.add(point); map.clear(); map.addMarker(new MarkerOptions().position(point)); } }); or in Kotlin: map.setOnMapClickListener { allPoints.add(it) map.clear() map.addMarker(MarkerOptions().position(it)) } Note that you might want to remember all your added … Read more

Google Maps v2 Marker zOrdering – Set to top

Aiden Fry’s answer works if you do actually display an InfoWindow. If you don’t, the marker won’t come to the front. Here is a hack to make it come to the front anyway: Create a custom InfoWindowAdapter that displays a 0dp info window: public class MapWindowAdapter implements GoogleMap.InfoWindowAdapter { private Context context = null; public … Read more

How to hide “Navigation” and “GPS Pointer” buttons when I click the marker on the android google map

For the button group you have outlined in red, you can disable it using the setMapToolbarEnabled() method in UISettings. From the documentation: Sets the preference for whether the Map Toolbar should be enabled or disabled. If enabled, users will see a bar with various context-dependent actions, including ‘open this map in the Google Maps app’ … Read more

How does one implement drag and drop for Android marker?

Implement Google Maps Android API v2, refer this: https://developers.google.com/maps/documentation/android/ and set on GoogleMap object setOnMarkerDragListener. For Ex: map.setOnMarkerDragListener(new OnMarkerDragListener() { @Override public void onMarkerDragStart(Marker arg0) { // TODO Auto-generated method stub Log.d(“System out”, “onMarkerDragStart…”+arg0.getPosition().latitude+”…”+arg0.getPosition().longitude); } @SuppressWarnings(“unchecked”) @Override public void onMarkerDragEnd(Marker arg0) { // TODO Auto-generated method stub Log.d(“System out”, “onMarkerDragEnd…”+arg0.getPosition().latitude+”…”+arg0.getPosition().longitude); map.animateCamera(CameraUpdateFactory.newLatLng(arg0.getPosition())); } @Override public void … Read more

Scatterplot with different size, marker, and color from pandas dataframe

scatter can only do one kind of marker at a time, so you have to plot the different types separately. Fortunately pandas makes this easy: import matplotlib.pyplot as plt import pandas as pd x = {‘speed’: [10, 15, 20, 18, 19], ‘meters’ : [122, 150, 190, 230, 300], ‘type’: [‘phone’, ‘phone’, ‘gps’, ‘gps’, ‘car’], ‘weight’: … Read more