<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href='../js/dojo-release-1.10.4/dijit/themes/claro/claro.css' rel='stylesheet' type='text/css' />
<script type="text/javascript" src="../js/dojo-release-1.10.4/dojo/dojo.js"></script>
<script type="text/javascript" src="../js/OpenLayers/OpenLayers.js"></script>
<script src="http://maps.google.co.kr/maps/api/js?v=3.2&sensor=false"></script>
<script type="text/javascript" src="http://map.vworld.kr/js/apis.do?type=Base&apiKey=37632EA1-D829-3AA6-83A6-BA5879097F56&domain=http://112.171.36.179:10133"></script>
<style type='text/css'>
html,body,#border,#map { margin:0; width:100%; height:100%; }
</style>
</head>
<body class='claro'>
<div id='border' data-dojo-type='dijit/layout/BorderContainer'>
<div data-dojo-type='dijit/layout/ContentPane' data-dojo-props='region:"center"'>
<div id='map'></div>
</div>
<div data-dojo-type='dijit/layout/ContentPane' data-dojo-props='region:"trailing"'>
Just an example
</div>
</div>
<script type='text/javascript'>
require(['dojo/ready', 'dojo/parser'], function (ready, Parser) {
ready(function () {
Parser.parse().then(function () {
var map = new OpenLayers.Map('map',{
displayProjection:new OpenLayers.Projection('EPSG:4326'),
projection:new OpenLayers.Projection('EPSG:900913')
});
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}
);
ghyb.id="ghyb"; map.addLayer(ghyb);
vBase = new vworld.Layers.Base('배경지도');
if (vBase != null){vBase.id="vBase"; map.addLayer(vBase); vBase.setVisibility(false); }
//2. 영상지도 추가하기
vSAT = new vworld.Layers.Satellite('영상지도');
if (vSAT != null) {vSAT.id="vSAT"; map.addLayer(vSAT); vBase.setVisibility(false); }
map.setBaseLayer(ghyb);
map.setCenter(new OpenLayers.LonLat(14243425.793355, 4342305.8698004), 8);
map.addControl(new OpenLayers.Control.LayerSwitcher());
});
});
});
</script>
</body>
</html>
'develop > web GIS' 카테고리의 다른 글
OpenLayers function (0) | 2015.04.01 |
---|---|
POST GIS VIEW (0) | 2015.03.10 |
지도위에 구글차트 띄우기 (0) | 2015.02.05 |
EPSG:4326 to EPSG:900913 transform (0) | 2014.11.19 |
OpenLayers addfeatures(json) 에서 json형식 java에서 만들기 (0) | 2014.11.17 |