Show only a specific country or location

Hi

I would like to know if there is a way to display only a specific area or country in the map. I don’t want the map to display any other location other than the specified. The map shouldn’t zoom out or scroll out of the specified boundary.

If there is a way to do that using the SDK or API, please let me know how. Any help would be appreciated.

Thanks

Hi.

Maybe the Static Image API is something which will help you.
Simplest snippet which you can use in your Maps SDK for Web application:

var apiKey = 'YOUR_API_KEY';
var options = {
  key: apiKey,
  zoom: 4,
  center: [19.48635, 50.64075],
  height: 512,
  width: 512,
  view: 'Unified',
  language: 'pl-PL',
  style: 'main',
  layer: 'basic',
  format: 'png'
};

tt.services.staticImage(options)
.go()
.then(function (result) {
  window.open(result);
});

Regards,
Mateusz

1 Like

You can also use normal map with setMaxBounds() and setMinZoom(), setMaxZoom()