Maps

' + '

' + locations[i][4] + '

' + '

' + locations[i][5] + '


' + newHtml + 'Learn More' + '
'; $('.jk-work').html(amcnt); } } })(marker, i)); google.maps.event.addListener(map, 'zoom_changed', (function(marker, i) { return function() { var pixelSizeAtZoom4 = 20; //the size of the icon at zoom level 4 var maxPixelSize = 350; //restricts the maximum size of the icon, otherwise the browser will choke at higher zoom levels trying to scale an image to millions of pixels var zoom = map.getZoom(); var relativePixelSize = Math.round(pixelSizeAtZoom4*Math.pow(1.2,zoom)); // use 2 to the power of current zoom to calculate relative pixel size. Base of exponent is 2 because relative size should double every time you zoom in if(relativePixelSize > maxPixelSize) //restrict the maximum size of the icon relativePixelSize = maxPixelSize; if(zoom < 4) //when zooming < 4, fix pixel size to 9 relativePixelSize = 20; var zoom = map.getZoom(); var url = '/wp-content/uploads/2022/03/JACKSON-DEMOLITION-LOGO-01.png'; if(marker.getIcon().url == '/wp-content/uploads/2022/03/JACKSON-DEMOLITION-LOGO-01.png'){ if (zoom > 8) { marker.setIcon( new google.maps.MarkerImage( marker.getIcon().url, //marker's same icon graphic null,//size null,//origin null, //anchor new google.maps.Size(relativePixelSize, relativePixelSize) //changes the scale ) ); } else { marker.setIcon( new google.maps.MarkerImage( marker.getIcon().url, //marker's same icon graphic null,//size null,//origin null, //anchor new google.maps.Size(relativePixelSize, relativePixelSize) //changes the scale ) ); } } }})(marker, i)); } } jQuery(document).ready(function($) { initMap(); });