Marcelo Ruiz
Marcelo Ruiz

Reputation: 393

Disable embedded markers on google maps

I want to disable or hide an infowindow for embedded markers in google map, I want to show only the markers that I add. There are relevant places that google use markers but I want it to remove, any suggestion?

Upvotes: 0

Views: 320

Answers (1)

duncan
duncan

Reputation: 31922

Those are POI (points of interest) markers. To hide them, try something like this:

var myStyles =[
    {
        featureType: "poi",
        elementType: "labels",
        stylers: [
              { visibility: "off" }
        ]
    }
];

var myOptions = {
    zoom: 10,
    center: new google.maps.LatLng(yourlatitude,yourlongitude),
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    styles: myStyles 
};

var map = new google.maps.Map(document.getElementById("map"), myOptions);

Upvotes: 1

Related Questions