-1

I am using world map via Google Map API and World map is going to repeat. I want to disable the same. I am using this code

<div id="map" style="width:100%;height:700px"></div>

<script>
var lat = 0;
var lang = 0;

var centerLatLng = new google.maps.LatLng(lat, lang);
  map = new google.maps.Map(document.getElementById('map'), {
  mapTypeId: google.maps.MapTypeId.ROADMAP,
  center: centerLatLng,
  scrollwheel: false,
  zoom: 3,
  minZoom: 1
});
</script>
Dinesh
  • 343
  • 3
  • 11

1 Answers1

0

If you don't want any repeats, you need to control the minimum zoom allowed and the width of your map to be less than or equal to one width of of the base tiles at the minimum zoom level allowed on your map. Check out this answer!

Community
  • 1
  • 1
Rafael Ribeiro
  • 59
  • 1
  • 11