Baljinder Kamboj
Baljinder Kamboj

Reputation: 67

Is it possible to hide all the default markers from google map such as restaurants, parks

I'm going to develop an android mobile application in which a user will select a road and my application will suggest him all the restaurants or hotel which are defined by me.

what I need

  1. don't want to show the restaurants or hotels suggested by google map.

Upvotes: 2

Views: 2595

Answers (1)

Sohaib
Sohaib

Reputation: 11307

This is called Hiding map features. Refer to this documentation

Update: You can play with this Styling Wizard and it will generate the json for you

Define a raw resource in /res/raw/style_json.json

[
 {
   "featureType": "poi.business",
   "elementType": "all",
   "stylers": [
     {
       "visibility": "off"
     }
   ]
 }
]

and assign it to your map.

boolean success = googleMap.setMapStyle(
                MapStyleOptions.loadRawResourceStyle(
                        this, R.raw.style_json));

Upvotes: 3

Related Questions