Disable bus stop on Google Map
Asked Answered
J

2

5

I'm developing an ASP.Net project using Google Maps. My team decided to use Google Maps API v2.

The problem is, I have to replace all bus stop icons on the map with my bus stop icons. To do this, I have to hide/disable them (or at least public transports) but I don't know how to do this. I searched many times but I have found no solution.

What command can I use to hide these bus stop icons?

Note: My team replaced Google Map v2 with Google Map v3.

Joshia answered 4/3, 2013 at 3:22 Comment(1)
Is your team aware that the V2 api will no longer work in about 3months time? developers.google.com/maps/documentation/javascript/v2/…Sessions
S
13

got it!

        var styles = [
    {
        "featureType": "transit.station.bus",
        "stylers": [{ "visibility": "off" }]
    }
    ];

    map.setOptions({ styles: styles });

that google maps control has got a great api !

Seawards answered 30/12, 2013 at 4:49 Comment(0)
S
0

Can't be done with Google Maps API v2. Can be done by using the Google Maps API v3 and styling the map to not display them. As Duncan_m noted, "The Google Maps JavaScript API Version 2 has been officially deprecated as of May 19, 2010. The V2 API will continue to work until May 19, 2013.", new development in that API is strongly discouraged.

Sunglass answered 4/3, 2013 at 12:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.