Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the Report a map error from google map

Tags:

google-maps

I have a v3 google map and in the bottom-right corner of the map, there is a "Report a map error" link overlaid onto the map. Does anyone know if it is possible to remove this from the map?

Edit: Here is an example of what I mean: http://jsfiddle.net/ahfA5/

like image 991
user730016 Avatar asked Jun 01 '12 22:06

user730016


1 Answers

You could style the map to get rid of this. Check this out.

Notice that if you compare the first two screenshots, the "Report a map error" link is present in the first, but not in the second.

The simplest way to apply a dummy style to the map so that it still looks like google maps but without the error link would be to do the following:

const styleOptions = {
  name: `Dummy Style`,
}

const MAP_STYLE = [
  {
    featureType: `road`,
    elementType: `all`,
    stylers: [{ visibility: `on` }],
  },
]
const mapType = new google.maps.StyledMapType(MAP_STYLE, styleOptions)
map.mapTypes.set(`Dummy Style`, mapType)
map.setMapTypeId(`Dummy Style`)

Here's the updated JSFiddle.

like image 84
Onkar Avatar answered Sep 19 '22 19:09

Onkar