Alaa Badran
Alaa Badran

Reputation: 1858

jQuery GMap hide Labels

I have been looking for a solution for this, but couldn't find any.

I have a map created with jQuery GMap What i want to do is to remove Country Labels from the map. Or even remove all labels. How to do that?

Code:

function prepareData(json){
    $("#tweets_map").gMap({ 
        maptype: G_NORMAL_MAP,
        controls: ["GSmallZoomControl"],
        markers: json,
        zoom: 5
    });
}

Upvotes: 0

Views: 1399

Answers (1)

yodog
yodog

Reputation: 6232

based on your tag, its actually very simple:

create a StyledMapType and pass the styles you want (visibility: "off" to labels).

see a working example here: http://jsfiddle.net/RASG/vA4eQ/

click "hide/show labels" to toggle.

Upvotes: 2

Related Questions