Notice
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 |
Tags
- 전자정부프레임워크
- SQLD
- kaldi korea
- java 배열
- 코딩테스트
- 파이썬
- kaldi zeroth
- JavaScript
- kaldi 한국
- 한국어 음성인식
- kaldi 한국어
- 리눅스
- 경영학 공부
- modal
- jQuery
- Java
- 오픈소스 음성인식
- 네이버음성합성
- 플랫폼공작소
- 이사작전
- rest api란
- MySQL
- java 코딩테스트
- kaldi zeroth korea
- Cordova
- rest란
- Firebase
- 음성합성
- kaldi
- css
- Today
- 32
- Total
- 302,264
팀드모네 IT Blog
Example of an OpenLayer marker output 본문
Hi there!
This is an example of an open layer marker output
1. Download the marker image
2. Source Code
<!doctype html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/css/ol.css" type="text/css">
<style>
.map {
height: 400px;
width: 100%;
}
</style>
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/build/ol.js"></script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList"></script>
<title>OpenLayers example</title>
</head>
<body>
<h2>My Map</h2>
<div id="map" class="map"></div>
<script>
function loadOlMap(){
var iconFeature = new ol.Feature({
geometry : new ol.geom.Point([128.82, 36.41]),
name : "map marker",
population : 4000,
rainfall : 500
});
var vectorSource = new ol.source.Vector({
features : [ iconFeature ]
});
var vectorLayer = new ol.layer.Vector({
source : vectorSource,
style: new ol.style.Style({
image: new ol.style.Icon({
anchor: [0.5, 0.96],
scale : 0.1,
src: './marker.png'
})
})
});
var map = new ol.Map({
layers : [ new ol.layer.Tile({source : new ol.source.OSM()}), vectorLayer],
target : 'map',
view : new ol.View({
projection: 'EPSG:4326',
center : [128.82, 36.41],
zoom : 8
})
});
}
loadOlMap();
</script>
</body>
</html>
3. Result
'GIS' 카테고리의 다른 글
CesiumJS을 사용하여 3D 건축물 세워보기 (0) | 2021.03.29 |
---|---|
CesiumJS 사용법 간단 안내 (0) | 2021.03.29 |
Example of an OpenLayer marker output (0) | 2021.01.20 |
0 Comments