Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript google map API remove “poi.business”

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34129
    austral
    Participant

    Im trying to remove the layer/overlay (not sure what it is called) that shows hotels on a google map. This is my code:

    
    src="//maps.google.com/maps/api/js?sensor=false">

    It has something to do with this, but cant work out how to integrate it:

    [
    {
    featureType: "poi.business",
    elementType: "labels",
    stylers: [
    { visibility: "off" }
    ]
    }
    ]
    #90607
    koshinae
    Member

    try this :


    ...

    var myOptions=
    {
    scrollwheel: false,
    zoom: 16,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    styles:
    [
    {
    featureType: "poi.business",
    elementType: "labels",
    stylers:
    [
    {
    visibility: "off"
    }
    ]
    }
    ]
    }

    ...
    #94697
    Inaxus
    Member

    For me , this works just to let the others know//

    mapTypeId: google.maps.MapTypeId.ROADMAP,
    styles:
    [
    {
    featureType: “poi.business”,
    elementType: “labels”,
    stylers:
    [
    {
    visibility: “off”
    }
    ]
    }
    ]
    Thank you Koshinae

    #130549
    DJansen
    Member

    This last one worked beautifully for me.
    Many thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.