1. Home
  2. Docs
  3. ZL WebGL Player
  4. ZOOMLOOK Actions
  5. setZoomLevel

setZoomLevel

* setZoomLevel (level)
* level: Number OR percentage.

Embed Code

				
					<div class="ZLContainer">
    <div id="zoom" style="width:100%; height:500px;"></div>
    <button onclick="setZoomLevel('110%')">
        setZoomLevel 110%
    </button>
    <button onclick="setZoomLevel('150%')">
        setZoomLevel 150%
    </button>
    <button onclick="setZoomLevel('200%')">
        setZoomLevel 200%
    </button>
    <p id="level" style="padding: 10px;"></p>
</div>

<script src="/zoomlook/assets/ZLWebGL.js"></script>
<script src="/zoomlook/assets/ZLPlayer.min.js"></script>
<script>
    const ZL = new ZLPlayer({
    			basePath: "https://us.zoomlook.cloud/zoomlookbook/zoomlook/pix/ZLGL360/",
    			clickLoad: false,
    			autoplay: true,
    			fps: 24,
    			type: "animation",
    		});
    		ZL.loadZLView("HLLdsS-552645", "zoom");
    	
    		function setZoomLevel(level) {
    			ZL.setZoomLevel(level);
    		}
</script>
				
			

How can we help?