±â¼ú»ç»ç¹«¼Ò
»ç¹«¼Ò¼Ò°³
»ç¾÷¼Ò°³
¿À½Ã´Â±æ
»ê¸²±â¼ú¾ÆÄ«µ¥¹Ì
¾ÆÄ«µ¥¹Ì¼Ò°³
°Á¼Ұ³
°»çÁø¼Ò°³
¼ö°½Åû
°Ô½ÃÆÇ
°øÁö»çÇ×
ÀÚÀ¯°Ô½ÃÆÇ
°¶·¯¸®
Q&A
¹¯°í´äÇϱâ
ÀÚ·á½Ç
»ê¸²Åä¸ñ
À°¸²ÀÚ·á
¹ý·É°ø½ÃÀÚ·á
±ÔÁ¤¼½ÄÀÚ·á
¾ÆÄ«µ¥¹ÌÀÚ·á½Ç
±âŸÀÚ·á
Ä® ·³
¿ÀÁ¡°ïÀÇ ¼¼»óÀ̾߱â
°Ô½ÃÆÇ
°øÁö»çÇ×
ÀÚÀ¯°Ô½ÃÆÇ
°¶·¯¸®
HOME > °Ô½ÃÆÇ >
ÀÚÀ¯°Ô½ÃÆÇ
´ÙÀ½Áöµµ
hisjs@hanmail.net
2,444
2014-10-21
¼Àç½À
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Áöµµ¿¡ »ç¿ëÀÚ ÄÁÆ®·Ñ ¿Ã¸®±â
</title>
<style>
html
,
body
{
width
:
100%
;
height
:
100%
;
margin
:
0
;
padding
:
0
;}
.map_wrap
{
position
:
relative
;
overflow
:
hidden
;
width
:
100%
;
height
:
350px
;}
.radius_border
{
border
:
1px
solid
#919191
;
border
-
radius
:
5px
;}
.custom_typecontrol
{
position
:
absolute
;
top
:
10px
;
right
:
10px
;
overflow
:
hidden
;
width
:
130px
;
height
:
30px
;
margin
:
0
;
padding
:
0
;
z-index
:
1
;
font-size
:
12px
;
font-family
:
'Malgun Gothic'
,
'¸¼Àº °íµñ'
,
sans-serif
;}
.custom_typecontrol
span
{
display
:
block
;
width
:
65px
;
height
:
30px
;
float
:
left
;
text-align
:
center
;
line-height
:
30px
;
cursor
:
pointer
;}
.custom_typecontrol
.btn
{
background
:
#fff
;
background
:
linear
-
gradient
(
#fff
,
#e6e6e6
);}
.custom_typecontrol
.btn
:hover
{
background
:
#f5f5f5
;
background
:
linear
-
gradient
(
#f5f5f5
,
#e3e3e3
);}
.custom_typecontrol
.btn
:active
{
background
:
#e6e6e6
;
background
:
linear
-
gradient
(
#e6e6e6
,
#fff
);}
.custom_typecontrol
.selected_btn
{
color
:
#fff
;
background
:
#425470
;
background
:
linear
-
gradient
(
#425470
,
#5b6d8a
);}
.custom_typecontrol
.selected_btn
:hover
{
color
:
#fff
;}
.custom_zoomcontrol
{
position
:
absolute
;
top
:
50px
;
right
:
10px
;
width
:
36px
;
height
:
80px
;
overflow
:
hidden
;
z-index
:
1
;
background-color
:
#f5f5f5
;}
.custom_zoomcontrol
span
{
display
:
block
;
width
:
36px
;
height
:
40px
;
text-align
:
center
;
cursor
:
pointer
;}
.custom_zoomcontrol
span
img
{
width
:
15px
;
height
:
15px
;
padding
:
12px
0
;
border
:
none
;}
.custom_zoomcontrol
span
:first-child
{
border-bottom
:
1px
solid
#bfbfbf
;}
</style>
</head>
<body>
<div
class=
"map_wrap"
>
<div
id=
"map"
style=
"width:100%;height:100%;position:relative;overflow:hidden;"
></div>
<!-- ÁöµµÅ¸ÀÔ ÄÁÆ®·Ñ div ÀÔ´Ï´Ù -->
<div
class=
"custom_typecontrol radius_border"
>
<span
id=
"btnRoadmap"
class=
"selected_btn"
onclick=
"setMapType('roadmap')"
>
Áöµµ
</span>
<span
id=
"btnSkyview"
class=
"btn"
onclick=
"setMapType('skyview')"
>
½ºÄ«À̺ä
</span>
</div>
<!-- Áöµµ È®´ë, Ãà¼Ò ÄÁÆ®·Ñ div ÀÔ´Ï´Ù -->
<div
class=
"custom_zoomcontrol radius_border"
>
<span
onclick=
"zoomIn()"
><img
src=
"http://i1.daumcdn.net/localimg/localimages/07/mapapidoc/ico_plus.png"
alt=
"È®´ë"
></span>
<span
onclick=
"zoomOut()"
><img
src=
"http://i1.daumcdn.net/localimg/localimages/07/mapapidoc/ico_minus.png"
alt=
"Ãà¼Ò"
></span>
</div>
</div>
<script
type=
"text/javascript"
src=
"//apis.daum.net/maps/maps3.js?apikey=¹ß±Þ¹ÞÀº API KEY¸¦ »ç¿ëÇϼ¼¿ä"
></script>
<script>
var
mapContainer
=
document
.
getElementById
(
'map'
),
// Áöµµ¸¦ Ç¥½ÃÇÒ div
mapOption
=
{
center
:
new
daum
.
maps
.
LatLng
(
35.25287906249931, 128.6040990523352
),
// ÁöµµÀÇ Áß½ÉÁÂÇ¥
level
:
3
// ÁöµµÀÇ È®´ë ·¹º§
};
var
map
=
new
daum
.
maps
.
Map
(
mapContainer
,
mapOption
);
// Áöµµ¸¦ »ý¼ºÇÕ´Ï´Ù
// ÁöµµÅ¸ÀÔ ÄÁÆ®·ÑÀÇ Áöµµ ¶Ç´Â ½ºÄ«ÀÌºä ¹öÆ°À» Ŭ¸¯Çϸé È£ÃâµÇ¾î ÁöµµÅ¸ÀÔÀ» ¹Ù²Ù´Â ÇÔ¼öÀÔ´Ï´Ù
function
setMapType
(
maptype
)
{
var
roadmapControl
=
document
.
getElementById
(
'btnRoadmap'
);
var
skyviewControl
=
document
.
getElementById
(
'btnSkyview'
);
if
(
maptype
===
'roadmap'
)
{
map
.
setMapTypeId
(
daum
.
maps
.
MapTypeId
.
ROADMAP
);
roadmapControl
.
className
=
'selected_btn'
;
skyviewControl
.
className
=
'btn'
;
}
else
{
map
.
setMapTypeId
(
daum
.
maps
.
MapTypeId
.
HYBRID
);
skyviewControl
.
className
=
'selected_btn'
;
roadmapControl
.
className
=
'btn'
;
}
}
// Áöµµ È®´ë, Ãà¼Ò ÄÁÆ®·Ñ¿¡¼ È®´ë ¹öÆ°À» ´©¸£¸é È£ÃâµÇ¾î Áöµµ¸¦ È®´ëÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù
function
zoomIn
()
{
map
.
setLevel
(
map
.
getLevel
()
-
1
);
}
// Áöµµ È®´ë, Ãà¼Ò ÄÁÆ®·Ñ¿¡¼ Ãà¼Ò ¹öÆ°À» ´©¸£¸é È£ÃâµÇ¾î Áöµµ¸¦ È®´ëÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù
function
zoomOut
()
{
map
.
setLevel
(
map
.
getLevel
()
+
1
);
}
</script>
</body>
</html>
125.135.202.101