I am developing an android application that would show Points of interest google map, i have my own sources so I am trying to remove the default points of interest(like malls,bus stops,...) that the google map show. i have searched the documentation for a solution and was unsuccessful is there a way to do it on android?
check out the blue bus stops that google provide
Click the "My Places" button just beneath the search bar. Click "Maps" and wait for the list of maps to appear down the left side of the screen. When they do, click the title of the map containing the marker that you want to remove.
You will be able to hide points of interests by navigating to Maps -> Edit -> Advanced Settings -> Scroll down to “Hide point of interest” -> Please enable this option.
You can remove an existing marker by setting up the marker to null using the marker. setMap() method.
You can hide them now!
New google maps update supports it: https://developers.google.com/maps/documentation/android-api/hiding-features
Here's how you can implement it:
@Override public void onMapReady(GoogleMap googleMap) { mMap = googleMap; try { boolean success = mMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.map_style)); if (!success) { Log.e("MapsActivityRaw", "Style parsing failed."); } } catch (Resources.NotFoundException e) { Log.e("MapsActivityRaw", "Can't find style.", e); } }
In raw directory you have to create a json file with map style you want to use.
You don't have to write this yourself, you can use editor, which google created:
https://mapstyle.withgoogle.com
I don't know which version introduced this feature, but it works at least for 9.6.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With