Search Results

Search found 2 results on 1 pages for 'beardy'.

Page 1/1 | 1 

  • Google Map V3 Constants as Variables

    - by Beardy
    In the example below I am trying to update the map type depending on the value of the selected option type. Unfortunately it doesn't seem to load the maptype into the google.maps.MapTypeId which is frustrating. I have tried it as a string as well as var gmapsMapType = google.maps.MapTypeId.++maptype; and I feel I am missing something here. HTML <select id="maptype" name="maptype"> <option selected="selected" value="RoadMap">Road Map</option> <option value="Satellite">Satellite</option> <option value="Hybrid">Hybrid</option> <option value="Terrain">Terrain</option> </select> JQUERY var maptype = $('#maptype>option:selected').val().toUpperCase(); var gmapsMapType = google.maps.MapTypeId.+maptype; map.setMapTypeId(gmapsMapType); Help is appreciated.

    Read the article

  • jQuery update Google Map

    - by Beardy
    I am trying to update a google map v3 with jQuery and at the moment it loads the map but when .preview is clicked the map scaled to the width and height and then goes grey. $('.preview').click(function(){ var width = $('#width').val(); var height = $('#height').val(); $('#map').css({ 'width':width, 'height':height }); var mapElement = document.getElementById('map'); var updateOptions = { zoom: 6 } var map = new google.maps.Map(mapElement, updateOptions); });

    Read the article

1