Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to increase the Zoom Level of Google Maps in wordpress
    primarykey
    data
    text
    <p>Here is the code I have written to add a marker to the google map by providing latitude and longitude. The problem is that I am not getting a zoomed google map. I have tried setting the zoom level to 12 but this has no effect to the closed map.</p> <pre><code>&lt;script type="text/javascript"&gt; var lat = 49.892231; var lng = -97.132530; var zoomLevel = 12; var allMarkers = []; var curMarkerInder = 0; var site_url = "&lt;?php echo bloginfo('stylesheet_directory') ?&gt;"; var map_left = 270; var map_top = 234; var bounds ; function open_window(markerId){ GEvent.trigger(allMarkers[markerId-1],"click"); } if (latLangs.length &gt; 0){ var mapOptions = { center: new google.maps.LatLng(lat, lng), zoom: zoomLevel, scrollwheel: false, draggable: false, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map"), mapOptions); bounds = new google.maps.LatLngBounds(); }else{ $("#map").remove(); } function markeradd(lat,lng,content){ var image = site_url + "/images/red.png" var markerOptions = { map: map, icon: image, position: new google.maps.LatLng(lat,lng) }; var marker = new google.maps.Marker(markerOptions); var content = content; google.maps.event.addListener(marker, 'click', function(e) { var infobox = new SmartInfoWindow({ position: marker.getPosition(), map: map, content: content }); }); var myLatLng = new google.maps.LatLng(lat,lng); bounds.extend(myLatLng); //map.setCenter(myLatLng); //map.setZoom(zoomLevel); } jQuery(document).ready(function($) { function createMarker(point,html,i) { var image = site_url + "/images/red.png" var Icon = new GIcon(); Icon.image = image; Icon.iconSize = new GSize(30, 52); Icon.shadowSize = new GSize(36, 34); Icon.iconAnchor = new GPoint(5, 34); Icon.infoWindowAnchor = new GPoint(5, 2); Icon.infoShadowAnchor = new GPoint(14, 25); opts = { "icon": Icon, "labelText": "A", "labelOffset": new GSize(-6, -10), "clickable": true }; var marker = new GMarker(point,opts); allMarkers[i] = marker; marker.hide(); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); last_marker = marker; }); return marker; } for(var i=0; i &lt; latLangs.length; i++) { markeradd(latLangs[i]['lat'],latLangs[i]['lng'],latLangs[i]['address']); } map.fitBounds(bounds); $("#menu-item-3122").addClass('current_page_item'); $("#menu-item-3123").addClass('current_page_item'); }); &lt;/script&gt; </code></pre> <p>How can i increase the level of zoom for this case? Please give me any Suggestions...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload