Demo entry 6642827



Submitted by anonymous on Sep 26, 2017 at 03:19
Language: HTML. Code size: 1.6 kB.

<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<script type='text/javascript' src='./OpenLayers.js'></script>
	<div style="position: absolute; top: 50px; left: 80px; width: 300px; height: 100px;">  
        <div id='map_element' style='width:1200px;height:500px;'></div>    
	<script type="text/javascript">
		var map;

		function init(){
            var bounds= new OpenLayers.Bounds(109.624691, 20.061808,  
             117.354358, 25.519619);

            var options = {  
                projection: "EPSG:4326",                  
                center: new OpenLayers.LonLat(113.3, 23.2),               

            map = new OpenLayers.Map('map_element',options);

            var wms = new OpenLayers.Layer.WMS("OpenLayers WMS",  
                    layers: "ltemr_gd:shijie_region"  

            map.addControl(new OpenLayers.Control.LayerSwitcher());  
            map.addControl(new OpenLayers.Control.MousePosition());  
            map.addControl(new OpenLayers.Control.ScaleLine());  
            map.addControl(new OpenLayers.Control.Scale);             


This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).