Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 457 Bytes

File metadata and controls

18 lines (16 loc) · 457 Bytes

Return the current camera position.

Description

The callback function will be involved with current camera position as CameraPosition data.


Code

map.getCameraPosition(function(camera) {
  var buff = ["Current camera position:\n",
      "latitude:" + camera.target.lat,
      "longitude:" + camera.target.lng,
      "zoom:" + camera.zoom,
      "tilt:" + camera.tilt,
      "bearing:" + camera.bearing].join("\n");
  alert(buff);
});