Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is it possible to remove the default points of interest from Android google map

Tags:

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

check out  the blue bus stops that google provide

like image 317
A.Alqadomi Avatar asked Mar 26 '14 12:03

A.Alqadomi


People also ask

How do I get rid of the default marker on Google Maps?

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.

Can I turn off points of interest Google Maps?

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.

How do I get rid of default marker?

You can remove an existing marker by setting up the marker to null using the marker. setMap() method.


1 Answers

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.

like image 102
Makalele Avatar answered Oct 05 '22 22:10

Makalele