ESRI Map is not centered properly when orientation changes from Portrait to Landscape mode

294 Views Asked by At

We are using ESRI Arcgis JavaScript API for our mapping requirements. Application is mobile friendly. We are facing below problem when User changes orientation from portrait to Landscape mode.

When we show the Map on device, we are showing device location on Map on Center of Map but when orientation changes, device location shifted slightly. We need to Show the device location on Center of Map even if orientation changes. Please suggest me the way to handle ESRI map Stuffs when orientation changes.

1

There are 1 best solutions below

1
On

Try and set viewport tag according to your application.

I tried this for similar purpose and it worked for me:-

<meta content="width=device-width; initial-scale=1.0; maximum-scale=2.0; minimum-scale=1.0; user-scalable=yes" name="viewport"/>