Search results

Center position zooming

You can achieve the center position zooming by using the centerPosition and zoomFactor APIs as mentioned in the following code example. The center position is used to configure the zoom level of maps, and zoom factor is used to specify the center position where the map should be displayed.

<!DOCTYPE html><html lang="en"><head>
    <title>EJ2 Maps</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Typescript UI Controls">
    <meta name="author" content="Syncfusion">
    <link href="index.css" rel="stylesheet">
    <script src="../../maps.min.js"></script>
<script src="" type="text/javascript"></script>

    <div id="container" style="height: 500px; width: 500px">
        <div id="element"></div>
    <script src="app.js"></script>
        let loader = document.getElementById('loader');
        let container = document.getElementById('container');
        if (loader) {
   = "none";
        if (container) {
   = "visible";

var ele = document.getElementById('container');
if(ele) { = "visible";
<script src="index.js" type="text/javascript"></script>