Search code examples
javascriptgoogle-mapsgoogle-maps-api-3google-maps-api-2

Styling/ Theming Google Maps using API V3


I'm trying to style Google Maps for my website like here: http://www.sidewalkprophets.com/shows They only show the USA and unfortunately the site uses API V2.

Is the same possible using Google Maps API V3? Can someone help me?


Solution

  • I have a simple form to you do this without so much scripting, etc.

    You can use the gmap3.net tool, its simples to edit your map how do you like to.

    Check this links:

    Gmap3 editor tool

    Tutorial

    To lock the position you can use map.Options{ draggable: false}; so the user can't drag the map and them you set the latitude and longitude that you want and the zoom level. This is a simple example:

    var mapDiv = document.getElementById('mappy');
    
    var mapOptions = {
    zoom: 12, //select the zoom that you want
    draggable: false, //this will lock the draggable option
    center: new google.maps.LatLng(-23.563594, -46.654239), //change here the latitude and longitude 
    mapTypeId : google.maps.MapTypeId.ROADMAP
    }
    pode ser ROADMAP, SATELLITE, HYBRID, TERRAIN
    map = new google.maps.Map( mapDiv, mapOptions ); //this will include the variables in one to create the map with the options
    

    Good lucky =) !