>> ±âº» Áöµµ »ý¼ºÇϱâ
Áöµµ°¡ À§Ä¡ÇÒ HTML ¿¤¸®¸ÕÆ®¸¦ ¹èÄ¡ÇÏ°í Å©±â¸¦ ¼³Á¤ÇÑ´Ù. Áöµµ¸¦ »ç¿ëÇϱâ À§Çؼ µî·ÏÇÑ APIÅ°¸¦ ÅëÇØ API¶óÀ̺귯¸®¸¦ ºÒ·¯¿Â´Ù.
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
// Áß½ÉÁÂÇ¥ ¼³Á¤
var lonLat = new OpenLayers.LonLat(126.978245, 37.566546);
lonLat.transform(projWGS84, projUTMK);
// create map object
map = new TRITOPS.TTMap("map", {
center: lonLat,
zoom: 9
});
});
//]]>
</script>
<style type="text/css">
/** »ç¿ëÀÚ ÁÜ ½ºÅ¸ÀÏ °ü·Ã css */
div.olControlZoomPanel .olControlZoomInItemInactive, div.olControlZoomPanel .olControlZoomOutItemInactive{
background: rgba(0, 0, 0, 0.2);
position: absolute;
}
div.olControlZoomPanel .olControlZoomInItemInactive{
background: url(./images/map_plus.png) no-repeat;
width: 27px;
height: 27px;
}
div.olControlZoomPanel .olControlZoomOutItemInactive{
background: url(./images/map_minus.png) no-repeat;
width: 27px;
height: 27px;
}
</style>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// ¸¶¿ì½º·Î Áöµµ À̵¿½Ã ÀÚ¿¬½º·¯¿î ¿òÁ÷ÀÓ È¿°ú ¿©ºÎ
map.addControl(new OpenLayers.Control.Navigation({dragPanOptions: { enableKinetic: true} }));
// »ç¿ëÀÚ ÁÜ ÄÁÆ®·Ñ À§Ä¡
map.addControl(new OpenLayers.Control.ZoomPanel({ "position": new OpenLayers.Pixel(10, 10) }));
// ±âº»À¸·Î ¼³Á¤µÈ ÁÜ °ü·Ã css
$("div.olControlPanZoomBar,div.olControlZoomToMaxExtentItemInactive").css("display", "none");
});
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// Áöµµ À̵¿Çϱâ
function moveCenter(type){
// À̵¿ÇÒ ÁöÁ¡ÀÇ ÁÂÇ¥
var point = new OpenLayers.LonLat(126.976872, 37.578042);
point.transform(projWGS84, projUTMK);
if(type == 1){ // Áß½ÉÁ¡ À̵¿Çϱâ
map.setCenter(point);
} else if(type == 2){ // Áß½ÉÁ¡ ºÎµå·´°Ô À̵¿Çϱâ
map.panTo(point);
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// ¸¶Ä¿ ¿Ã¸®±â
function addMarker(){
// ±âº» ¸¶Ä¿
var marker1 = map.addMarkerPopup(lonLat.lon, lonLat.lat);
marker1.id = "marker_1";
// »ç¿ëÀÚ Á¤ÀÇ ¸¶Ä¿
var point = new OpenLayers.LonLat(126.988802, 37.564879);
point.transform(projWGS84, projUTMK);
var size = new OpenLayers.Size(48, 48);
var selectedIcon = new OpenLayers.Icon("images/select-arrow2.gif", size);
var marker2 = map.addMarkerPopup(point.lon, point.lat, {
icon: selectedIcon
});
marker2.id = "marker_2";
}
// ¸¶Ä¿ Áö¿ì±â(Àüü, ƯÁ¤¸¶Ä¿)
function removeMarker(id){
var markers = map.layerMap.MARKER; // all markers
if(id == "all"){ // Àüü
markers.removeAllMarker();
} else{ // ƯÁ¤¾ÆÀ̵𠸶Ŀ
var marker = markers.getMarkerById(id);
if(marker){
markers.removeMarker(marker);
}
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var sign = null; // Ç©¸» object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// Ç©¸» ¼³Á¤
sign = new TRITOPS.Control.SignPoint({
signCallback: signCallback // callback function
});
map.addControl(sign);
});
// Ç©¸»Âï±â È°¼ºÈ
var signActivate = function(){
sign.activate();
}
// Ç©¸»Âï±â ºñÈ°¼ºÈ
var signDeactivate = function(){
sign.deactivate();
var obj = $("div#result"); // jQuery selector
obj.empty();
}
// Ç©¸»Âï±â callback function
var signCallback = function(e){
var geom = e.geometry;
obj.html("°æµµ: "+geom.x+", À§µµ: "+geom.y);
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// ÁÂÇ¥ º¯È¯Çϱâ
function transCoords(type){
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
if(type == 0){ // °æÀ§µµ ÁÂÇ¥ ¡æ UTM-K ÁÂÇ¥ º¯È¯
var lonLat = new OpenLayers.LonLat(126.978245, 37.566546);
lonLat.transform(projWGS84, projUTMK);
} else if(type == 1){ // UTM-K ÁÂÇ¥ ¡æ °æÀ§µµ ÁÂÇ¥ º¯È¯
var lonLat = new OpenLayers.LonLat(14133713.213004, 4518230.6056297);
lonLat.transform(projUTMK, projWGS84);
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// ¸¶Ä¿ À̹ÌÁö »çÀÌÁî
var size = new OpenLayers.Size(48, 48);
// ¸¶Ä¿ À̹ÌÁö
var selectedIcon = new OpenLayers.Icon("images/select-arrow2.gif", size);
var lonLat = new OpenLayers.LonLat(126.978245, 37.566546);
lonLat.transform(projWGS84, projUTMK);
// ¸¶Ä¿ Ãß°¡
var marker1 = map.addMarkerPopup(lonLat.lon, lonLat.lat, {
icon: selectedIcon,
popupContentHTML: "¾ÆÀÌÄÜ º¯°æ",
closeBox: true,
panMapIfOutOfView: false
});
// marker popup object
var popMarker1 = marker1.feature.popup;
// marker popup offset ¼³Á¤
popMarker1.anchor = {
size: new OpenLayers.Size(0, 0),
offset: new OpenLayers.Pixel((size.w/2), 0)
};
// À§Ä¡ °íÁ¤ - br(bottom right), tr(top right), tl(top left), bl(bottom left)
popMarker1.calculateRelativePosition = function(px){
return "br";
}
// ¸¶Ä¿À̺¥Æ® ¼³Á¤ - ¸¶Ä¿Ç¥½Ã¿Í µ¿½Ã¿¡ Æ˾÷µµ º¸À̵µ·Ï
marker1.events.triggerEvent("mousedown", null);
var lonLat2 = new OpenLayers.LonLat(126.964598, 37.559810);
lonLat2.transform(projWGS84, projUTMK);
// ¸¶Ä¿ Ãß°¡
var marker2 = map.addMarkerPopup(lonLat2.lon, lonLat2.lat, {
popupContentHTML: "<div style="width:170px;padding:4px;border:solid 1px #c4370e;">Æ˾÷ÀÀ¿ë - Ŭ¸¯, ÅÍÄ¡ À̺¥Æ® Ãß°¡</div>",
closeBox: false
});
marker2.events.triggerEvent("mousedown", null);
// Ŭ¸¯ À̺¥Æ® ÇÔ¼ö È£Ãâ
initPopup(marker2.feature.popup);
});
// Æ˾÷ Ŭ¸¯ À̺¥Æ® ÇÔ¼ö
var initPopup = function(pop, eventFun){
if(!eventFun){
eventFun = function(e){
var marker = e.object;
var popup = marker.feature.popup;
map.removePopup(popup);
popup.hide();
OpenLayers.Event.stop(e, true);
}
}
// À̺¥Æ® Ãß°¡
pop.events.on({
click: eventFun,
touchstart: eventFun
});
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
var lonLat = new OpenLayers.LonLat(126.935502, 37.587021);
lonLat.transform(projWGS84, projUTMK);
var marker1 = map.addMarkerPopup(lonLat.lon, lonLat.lat);
var lonLat2 = new OpenLayers.LonLat(126.935502, 37.587021);
lonLat2.transform(projWGS84, projUTMK);
var marker2 = map.addMarkerPopup(lonLat2.lon, lonLat2.lat);
var lonLat3 = new OpenLayers.LonLat(127.053390, 37.517988);
lonLat3.transform(projWGS84, projUTMK);
var marker3 = map.addMarkerPopup(lonLat3.lon, lonLat3.lat);
// ¸¶Ä¿·¹À̾î
var markerLayer = map.layerMap.MARKER;
// ¸¶Ä¿·¹ÀÌ¾î ¿µ¿ª °¡Á®¿À±â
var ex = markerLayer.getDataExtent();
if(ex != null){
// ¸¶Ä¿·¹ÀÌ¾î ¿µ¿ªÀ¸·Î ´Ù½Ã ¼³Á¤
map.zoomToExtent(ex);
}
});
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// À̺¥Æ® ¼³Á¤
map.events.register("moveend", map, function(e){
var center = map.getCenter();
var wgsCenter = center.clone();
wgsCenter.transform(projUTMK, projWGS84);
var html = "WGS84 - °æµµ : "+wgsCenter.lon.toFixed(6) + ", À§µµ : "+wgsCenter.lat.toFixed(6);
html += " / UTM-KÁÂÇ¥ - °æµµ : "+center.lon + ", À§µµ : "+center.lat;
$("div#result").html(html);
});
});
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// Áö¹øÁÖ¼Ò °Ë»ö
function searchAddr(){
var pg = '1'; // ÆäÀÌ¡ °ü·Ã º¯¼ö´Â ¹®ÀÚ¿·Î ÀÔ·ÂÀ» ¹Þ½À´Ï´Ù.
var ps = '10';
var data = {
start: pg, // ÇöÀç ÆäÀÌÁö
rows: ps, // ÆäÀÌ¡ Å©±â
word: $("#search_addr").val()
};
map.searchAddr(data, resultSearchAddr);
}
// Áö¹øÁÖ¼Ò °Ë»ö callback function
var resultSearchAddr = function(result){
var geojsonFormat = new OpenLayers.Format.GeoJSON();
var collection = geojsonFormat.read(result);
var properties = result.properties;
if(properties){
if(properties.status == 'error'){
alert(properties.statusDetail);
} else{
if(collection.length > 0){
for(var i=0; i<collection.length; i++){
var feat = collection[i];
feat.geometry.transform(map.displayProjection, map.getProjectionObject());
/**
* Áö¹ø Á¤º¸
* sido: ½Ã/µµ, sigungu: ½Ã/±º/±¸, gu: ±¸, lawEmd: ¹ýÁ¤µ¿, admEmd: ÇàÁ¤µ¿, li: ¸®, bunji: ¹øÁö, ho: È£
* roadName: µµ·Î¸í, roadNo1: °Ç¹° ÁÖ¹øÈ£, roadNo2: °Ç¹° ºÎ¹øÈ£
*/
var data = feat.data;
// Áö¹øÁÖ¼Ò
var jibunAddr = data.sido + " " + data.sigungu;
if(data.gu){
jibunAddr += " " + data.gu;
}
// ¹ýÁ¤µ¿
jibunAddr += " " + data.lawEmd;
if(data.li && data.li.length > 0){
jibunAddr += " " + data.li;
}
if(data.bunji && data.bunji.length > 0){
if(data.isSan){
jibunAddr += " Ȑ";
}
if(data.bunji && data.bunji != "0"){
jibunAddr += " " + data.bunji;
}
if(data.ho && data.ho.length > 0){
jibunAddr += "-" + data.ho;
}
if(data.bunji && data.bunji != "0"){
jibunAddr += " ¹øÁö";
}
}
var title = data.lawEmd;
// µµ·Î¸í ÁÖ¼Ò
var roadAddr = "";
if(data.roadName && data.roadName.length > 0){
title += " / " + data.roadName;
roadAddr += data.sido + " " + data.sigungu + " " +data.gu;
roadAddr += " " + data.roadName + " " + data.roadNo1;
if(data.roadNo2 && data.roadNo2 != "0"){
roadAddr += " - " + data.roadNo2;
}
}
// À§Ä¡Âï±â
var popHtml = "";
popHtml += "<div class=\"marker_popup\">";
popHtml += " <div class=\"marker_popup_1\">"+title+"</div>";
popHtml += " <div class=\"marker_popup_2\">"+jibunAddr+"<br />"+roadAddr+"</div>";
popHtml += "</div>";
var marker = map.addMarkerPopup(feat.geometry.x, feat.geometry.y, {popupContentHTML:popHtml, closeBox:false});
marker.icon.imageDiv.style.cursor = "pointer";
marker.events.triggerEvent("mousedown", null);
var ex = map.layerMap.MARKER.getDataExtent();
if(ex != null){
map.zoomToExtent(ex);
map.setCenter(ex.getCenterLonLat());
}
}
} else{
alert("°Ë»ö°á°ú°¡ ¾ø½À´Ï´Ù.");
}
}
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// ¿ìÆí¹øÈ£·Î Áö¹øÁÖ¼Ò °Ë»ö
function searchAddrByZipcode(){
var zip1 = $("#zip_1").val();
var zip2 = $("#zip_2").val();
var bunji = $("#bunji").val();
var ho = $("#ho").val();
var addr = {
zipcode: zip1+zip2,
bunji: bunji,
ho: ho,
isSan: "0"
};
map.searchAddr(addr, resultSearchAddrByZipcode);
}
// ¿ìÆí¹øÈ£·Î Áö¹øÁÖ¼Ò °Ë»ö callback function
function resultSearchAddrByZipcode(result){
var geojsonFormat = new OpenLayers.Format.GeoJSON();
var collection = geojsonFormat.read(result);
var properties = result.properties;
if(properties){
if(properties.status == 'error'){
alert(properties.statusDetail);
} else{
if(collection.length > 0){
for(var i=0; i<collection.length; i++){
var feat = collection[i];
feat.geometry.transform(map.displayProjection, map.getProjectionObject());
/**
* Áö¹ø Á¤º¸
* sido: ½Ã/µµ, sigungu: ½Ã/±º/±¸, gu: ±¸, lawEmd: ¹ýÁ¤µ¿, admEmd: ÇàÁ¤µ¿, li: ¸®, bunji: ¹øÁö, ho: È£
* roadName: µµ·Î¸í, roadNo1: °Ç¹° ÁÖ¹øÈ£, roadNo2: °Ç¹° ºÎ¹øÈ£
*/
var jibun = feat.data;
// Áö¹øÁÖ¼Ò
var jibunAddr = jibun.sido + " " + jibun.sigungu + " " + jibun.gu;
// ¹ýÁ¤µ¿
jibunAddr += jibun.lawEmd;
if(jibun.li && jibun.li.length > 0){
jibunAddr += " " + jibun.li;
}
if (jibun.bunji && jibun.bunji.length > 0) {
if(jibun.isSan){
jibunAddr += " Ȑ";
}
jibunAddr += " " + jibun.bunji;
if(jibun.ho && jibun.ho.length > 0){
jibunAddr += "-" + jibun.ho;
}
jibunAddr += " ¹øÁö";
}
// À§Ä¡Âï±â
var popHtml = "<div>"+jibunAddr+"</div>";
var marker = map.addMarkerPopup(feat.geometry.x, feat.geometry.y, {popupContentHTML:popHtml, closeBox:false});
marker.events.triggerEvent("mousedown", null);
var ex = map.layerMap.MARKER.getDataExtent();
if(ex != null){
map.zoomToExtent(ex);
map.setCenter(ex.getCenterLonLat());
}
}
} else{
alert("°Ë»ö°á°ú°¡ ¾ø½À´Ï´Ù.");
}
}
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// µµ·Î¸íÁÖ¼Ò °Ë»ö
function searchAddrRoad(){
var sido = $("#sido").val();
var sigungu = $("#sigungu").val();
var roadNm = $("#rd_nm").val();
var roadNo1 = $("#rd_no1").val();
var roadNo2 = $("#rd_no2").val();
var data = {
sido: sido,
sigungu: sigungu,
roadName: roadNm,
roadNo1: roadNo1,
roadNo2: roadNo2
};
map.searchAddrRoad(data, resultSearchAddrRoad);
}
// µµ·Î¸íÁÖ¼Ò °Ë»ö callback function
function resultSearchAddrRoad(result){
var geojsonFormat = new OpenLayers.Format.GeoJSON();
var collection = geojsonFormat.read(result);
var properties = result.properties;
if(properties){
if(properties.status == 'error'){
alert(properties.statusDetail);
} else{
if(collection.length > 0){
for(var i=0; i<collection.length; i++){
var feat = collection[i];
feat.geometry.transform(map.displayProjection, map.getProjectionObject());
var road = feat.data;
// Áö¹øÁÖ¼Ò
var jibunAddr = road.sido + " " + road.sigungu + " " + road.gu;
jibunAddr += " " + road.lawEmd;
if(road.li && road.li.length > 0){
jibunAddr += " " + road.li;
}
if(road.bunji && road.bunji.length > 0){
if(road.isSan){
jibunAddr += " Ȑ";
}
jibunAddr += " " + road.bunji;
if (road.ho && road.ho != "0"){
jibunAddr += "-" + road.ho;
}
jibunAddr += " ¹øÁö";
}
// µµ·Î¸í ÁÖ¼Ò
var roadAddr = "";
if(road.roadName && road.roadName.length > 0){
roadAddr += road.sido + " " + road.sigungu + " " +road.gu;
roadAddr += " " + road.roadName + " " + road.roadNo1;
if(road.roadNo2 && road.roadNo2 != "0"){
roadAddr += " - " + road.roadNo2;
}
}
// À§Ä¡Âï±â
var popHtml = "";
popHtml += "<div>";
popHtml += " <div>"+road.roadName+"</div>";
popHtml += " <div>"+roadAddr+"<br />"+jibunAddr+"</div>";
popHtml += "</div>";
var marker = map.addMarkerPopup(feat.geometry.x, feat.geometry.y, {popupContentHTML:popHtml, closeBox:false});
marker.events.triggerEvent("mousedown", null);
var ex = map.layerMap.MARKER.getDataExtent();
if(ex != null){
map.zoomToExtent(ex);
map.setCenter(ex.getCenterLonLat());
}
}
} else{
alert("°Ë»ö°á°ú°¡ ¾ø½À´Ï´Ù.");
}
}
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
});
// ¸íĪ °Ë»ö
function searchPoi(){
var pg = '1'; // ÆäÀÌ¡ °ü·Ã º¯¼ö´Â ¹®ÀÚ¿·Î ÀÔ·ÂÀ» ¹Þ½À´Ï´Ù.
var ps = '10';
var data = {
start: pg, // ÇöÀç ÆäÀÌÁö
rows: ps, // ÆäÀÌ¡ Å©±â
word: $("#search_word").val()
};
map.searchPoi(data, resultSearchPoi);
}
// ¸íĪ °Ë»ö callback function
function resultSearchPoi(result){
var geojsonFormat = new OpenLayers.Format.GeoJSON();
var collection = geojsonFormat.read(result);
var properties = result.properties;
if(properties){
if(properties.status == 'error'){
alert(properties.statusDetail);
} else{
if(collection.length > 0){
for(var i=0; i<collection.length; i++){
var feat = collection[i];
feat.geometry.transform(map.displayProjection, map.getProjectionObject());
/**
* Áö¹ø Á¤º¸
* sido: ½Ã/µµ, sigungu: ½Ã/±º/±¸, gu: ±¸, lawEmd: ¹ýÁ¤µ¿, admEmd: ÇàÁ¤µ¿, li: ¸®, bunji: ¹øÁö, ho: È£
* roadName: µµ·Î¸í, roadNo1: °Ç¹° ÁÖ¹øÈ£, roadNo2: °Ç¹° ºÎ¹øÈ£
*/
var data = feat.data;
// Áö¹øÁÖ¼Ò
var jibunAddr = data.sido + " " + data.sigungu;
if(data.gu){
jibunAddr += " " + data.gu;
}
// ¹ýÁ¤µ¿
jibunAddr += " " + data.lawEmd;
if(data.li && data.li.length > 0){
jibunAddr += " " + data.li;
}
if (data.bunji && data.bunji.length > 0) {
if(data.isSan){
jibunAddr += " Ȑ";
}
if(data.bunji && data.bunji != "0"){
jibunAddr += " " + data.bunji;
}
if(data.ho && data.ho.length > 0){
jibunAddr += "-" + data.ho;
}
if(data.bunji && data.bunji != "0"){
jibunAddr += " ¹øÁö";
}
}
// µµ·Î¸í ÁÖ¼Ò
var roadAddr = "";
if(data.roadName && data.roadName.length > 0){
roadAddr += data.sido + " " + data.sigungu + " " +data.gu;
roadAddr += " " + data.roadName + " " + data.roadNo1;
if(data.roadNo2 && data.roadNo2 != "0"){
roadAddr += " - " + data.roadNo2;
}
}
var title = data.name;
// À§Ä¡Âï±â
var popHtml = "";
popHtml += "<div>";
popHtml += " <div>"+title+"</div>";
popHtml += " <div>"+jibunAddr+"<br/>+roadAddr+"</div>";
popHtml += "</div>";
var marker = map.addMarkerPopup(feat.geometry.x, feat.geometry.y, {popupContentHTML:popHtml, closeBox:false});
var ex = map.layerMap.MARKER.getDataExtent();
if(ex != null){
map.zoomToExtent(ex);
map.setCenter(ex.getCenterLonLat());
}
}
} else{
alert("°Ë»ö°á°ú°¡ ¾ø½À´Ï´Ù.");
}
}
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
map.cns = new TRITOPS.Control.Cns({
position: new OpenLayers.Pixel(50, 0), // Ãâ¹ß, µµÂø ÆгΠÀ§Ä¡
onCompleted: resultCNS // °æ·Î°Ë»ö °á°ú callback function
});
map.addControl(map.cns);
});
// Ãâ¹ßÁö ¼±ÅÃ
function setStartCns(){
map.cns.sourcePoint.activate();
}
// µµÂøÁö ¼±ÅÃ
function setEndCns(){
map.cns.destinationPoint.activate();
}
// °æÀ¯Áö Ãß°¡
function setRouteCns(){
map.cns.addRoutePoint(lonLat.lon, lonLat.lat);
}
// ƯÁ¤ °æÀ¯Áö »èÁ¦
function removeRoutes(idx){
map.cns.removeRoutePoint(idx);
}
// °æÀ¯Áö ÀüºÎ »èÁ¦
function removeAllRoutes(){
map.cns.removeAllRoutePoint();
}
// °æ·Î°Ë»ö
var resultCNS = function(){
// °æ·Î°Ë»ö
var start = map.cns.sourcePoint.vector.geometry;
var end = map.cns.destinationPoint.vector.geometry;
if(start == null){
alert("Ãâ¹ßÁöÁ¡À» ¼±Åà ¶Ç´Â °Ë»öÇØ Áֽʽÿä.");
setStartCns();
return false;
} else if(end == null){
alert("µµÂøÁöÁ¡À» ¼±Åà ¶Ç´Â °Ë»öÇØ Áֽʽÿä.");
setEndCns();
return false;
}
var bool = map.cns.search(function(data){
// ±æã±â ½ÃÀÛ
if($.type(data) != "undefined"){
var geojson_format = new OpenLayers.Format.GeoJSON();
var collection = geojson_format.read(data);
var cnsPanel = map.cns;
if(data.properties){
if(data.properties.status == 'error'){
if(data.properties.statusDetail == 'Ãâ¹ßÁö ÀÌ»ó'){
cnsPanel.pinShow(cnsPanel.destinationPoint.vector);
cnsPanel.sourcePoint.activate();
} else if(data.properties.statusDetail == 'µµÂøÁö ÀÌ»ó'){
cnsPanel.pinShow(cnsPanel.sourcePoint.vector);
cnsPanel.destinationPoint.activate();
}
// °æ·Î°Ë»ö ½ÇÆÐ
alert("°æ·Î°Ë»ö¿¡ ½ÇÆÐÇÏ¿´½À´Ï´Ù.");
} else{
var tempArr = [];
var prop = null;
var cnsType = null;
// ÃѰŸ®
var totalDist = data.properties.distance / 1000;
totalDist = totalDist.toFixed(2);
var totalTime = data.properties.time;
for(var i=0; i<collection.length; i++){
collection[i].geometry.transform(map.displayProjection, map.getProjectionObject());
prop = collection[i].data;
cnsType = prop.cnsType;
if(cnsType == "yudo"){
var road = prop.codeDetail; // µµ·Î¸í
road = road.replace("À¸·Î", "·Î");
// À¯µµÁöÁ¡ ¸¶¿ì½º ¿À¹ö½Ã
var yudoTitle = road.substring(0, road.indexOf(" "));
if(!isNaN(yudoTitle)){
yudoTitle = yudoTitle + "¹ø µµ·Î";
road = yudoTitle + road.substring(road.indexOf(" ")+1);
}
yudoTitle = (prop.index)+". "+yudoTitle;
var popDivW = fnGetByteLen(yudoTitle) * 6;
collection[i].data.overContentHtml = "<div style=\"padding:4px;background-color:#fff;border:solid 1px #000;\">"+yudoTitle+"</div>";
collection[i].enabledHover = true;
} else if(cnsType == "extra"){
collection[i].isUnselect = true;
} else{
tempArr.push(collection[i]);
collection[i].isUnselect = true;
if(this.isSimplify) collection[i].geometry = collection[i].geometry.simplify(cnsPanel.tolerance);
}
cnsPanel.cnsLayer.addFeatures(collection[i]);
}
cnsPanel.pinShow(cnsPanel.sourcePoint.vector);
cnsPanel.pinShow(cnsPanel.destinationPoint.vector);
var ex = cnsPanel.cnsLayer.getDataExtent();
if (cnsPanel.isAutoScale && ex != null) {
map.zoomToExtent(ex);
map.zoomOut();
}
map.setCenter(ex.getCenterLonLat());
}
}
}
});
}
//]]>
</script>
<style type="text/css">
/** »ó´Ü ÆгΠ*/
.czControlCns2{
display: none;
}
/** »ó´Ü ÆгΠdiv style */
.czControlCns2 div{
float: left;
width: 53px;
height: 39px;
margin: 5px;
}
/** »ó´Ü ÆгΠÃâ¹ßÁö È°¼ºÈ½Ã ½ºÅ¸ÀÏ */
.czControlCns2 .czControlCnsPointSourceItemActive{
width: 53px;
height: 39px;
background-image: url("images/start.gif");
background-position: 50% 50%;
}
/** »ó´Ü ÆгΠÃâ¹ßÁö ºñÈ°¼ºÈ½Ã ½ºÅ¸ÀÏ */
.czControlCns2 .czControlCnsPointSourceItemInactive{
width: 53px;
height: 39px;
background-image: url("images/start.gif");
background-position: 50% 50%;
}
/** »ó´Ü ÆгΠµµÂøÁö È°¼ºÈ½Ã ½ºÅ¸ÀÏ */
.czControlCns2 .czControlCnsPointDestinationItemActive{
width: 53px;
height: 39px;
background-image: url("images/end.gif");
background-position: 50% 50%;
}
/** »ó´Ü ÆгΠµµÂøÁö ºñÈ°¼ºÈ½Ã ½ºÅ¸ÀÏ */
.czControlCns2 .czControlCnsPointDestinationItemInactive{
width: 53px;
height: 39px;
background-image: url("images/end.gif");
background-position: 50% 50%;
}
</style>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
map.cns = new TRITOPS.Control.Cns({
position: new OpenLayers.Pixel(50, 0), // Ãâ¹ß, µµÂø ÆгΠÀ§Ä¡
displayClass: "czControlCns2",
isDragFeature: false
});
map.addControl(map.cns);
styleAccept();
});
// ±æã±â ½ºÅ¸ÀÏ º¯°æ
function styleAccept(){
map.cns.deactivate();
var sourceStyle = {
externalGraphic: "images/start.gif",
graphicWidth: 53,
graphicHeight: 39,
graphicYOffset: -39
};
map.cns.sourceStyle = sourceStyle;
var destinationStyle = {
externalGraphic: "images/end.gif",
graphicWidth: 53,
graphicHeight: 39,
graphicYOffset: -39
};
map.cns.destinationStyle = destinationStyle;
var routeStyle = {
externalGraphic: "images/pass.gif",
graphicWidth: 53,
graphicHeight: 39,
graphicYOffset: -39
};
map.cns.routeStyle = routeStyle;
var symbolStyle = {
"Point": {
pointRadius: 5,
graphicName: "circle", // square|star|x|cross|triangle|circle
fillColor: "#00FF00",
fillOpacity: 0.5,
strokeWidth: 2,
strokeOpacity: 1,
strokeColor: "#000",
labelSelect: true,
fontWeight: "bold"
},
"Line": {
strokeWidth: 5,
strokeOpacity: 0.5,
strokeColor: "#0000FF",
strokeLinecap: "square", // butt|round|square
strokeDashstyle: "dash" // dot|dash|dashdot|ongdash|longdashdot|solid
}
};
map.cns.cnsSymbolizers = symbolStyle;
var selectSymbolStyle = {
pointRadius: 5,
graphicName: "circle", // square|star|x|cross|triangle|circle
fillColor: "#00FF00",
fillOpacity: 0.5,
strokeWidth: 3,
strokeOpacity: 1,
strokeColor: "#00FF00",
labelSelect: true,
fontWeight: "bold"
};
map.cns.cnsSelectSymbolizers = selectSymbolStyle;
map.cns.activate();
var startPoint = new OpenLayers.LonLat(126.978245, 37.566546);
startPoint.transform(projWGS84, projUTMK);
map.cns.setSourcePoint(startPoint.lon, startPoint.lat);
var endPoint = new OpenLayers.LonLat(127.128106, 37.419790);
endPoint.transform(projWGS84, projUTMK);
map.cns.setDestinationPoint(endPoint.lon, endPoint.lat);
var routePoint = new OpenLayers.LonLat(126.792679, 37.581579);
routePoint.transform(projWGS84, projUTMK);
map.cns.addRoutePoint(routePoint.lon, routePoint.lat);
map.cns.search();
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// °Å¸®°è»ê ¼³Á¤
map.cns = new TRITOPS.Control.Cns();
map.addControl(map.cns);
});
// °Å¸®°è»ê
function getDistance(){
var start = new OpenLayers.LonLat(14135108.268190, 4518344.320307);
var end = new OpenLayers.LonLat(14139108.268190, 4515344.320307);
/**
* ¸ðµå ¼³Á¤
* Á÷¼± - TRITOPS.Control.Cns.STRAIGHT_TYPE
* ÃÖÀû - TRITOPS.Control.Cns.BEST_TYPE
* ÃÖ´Ü - TRITOPS.Control.Cns.SHORTEST_TYPE
* °í¼Ó - TRITOPS.Control.Cns.HIGHWAY_TYPE
* ¹«·á - TRITOPS.Control.Cns.FREE_TYPE
*/
map.cns.cnsType = TRITOPS.Control.Cns.STRAIGHT_TYPE
map.cns.distance(start, end, resultsDistance);
}
// °Å¸®°è»ê callback function
function resultsDistance(data){
if($.type(data) != "undefined"){
var prop = data.properties;
if(prop){
if(prop.status == "error"){
alert(prop.statusDetail);
} else{
$("div#result").html("°Å¸® : "+prop.distance+"m");
}
}
}
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
var size = new OpenLayers.Size(48, 48);
var selectedIcon = new OpenLayers.Icon("http://www.ttmap.co.kr/api/images/select-arrow2.gif", size);
var marker1 = map.addMarkerPopup(lonLat.lon, lonLat.lat, {
icon: selectedIcon,
popupContentHTML: "¾ÆÀÌÄÜ º¯°æ",
printMessage: "¾ÆÀÌÄÜ º¯°æ", // À̹ÌÁö ÀúÀå½Ã Ãâ·ÂµÉ ÅؽºÆ®
closeBox: true,
panMapIfOutOfView: false
});
// marker popup object
var popMarker1 = marker1.feature.popup;
// offset ÁÖ±â
popMarker1.anchor = {
size: new OpenLayers.Size(0, 0),
offset: new OpenLayers.Pixel((size.w/2), 0)
};
// À§Ä¡ °íÁ¤ - br(bottom right), tr(top right), tl(top left), bl(bottom left)
popMarker1.calculateRelativePosition = function(px){
return "br";
}
marker1.events.triggerEvent("mousedown", null);
var lonLat2 = new OpenLayers.LonLat(126.964598, 37.559810);
lonLat2.transform(projWGS84, projUTMK);
var marker2 = map.addMarkerPopup(lonLat2.lon, lonLat2.lat, {
popupContentHTML: "<div style=\"width:50px;padding:4px;border:solid 1px #c4370e;\">Æ˾÷ÀÀ¿ë</div>",
printMessage: "Æ˾÷ÀÀ¿ë", // À̹ÌÁö ÀúÀå½Ã Ãâ·ÂµÉ ÅؽºÆ®
closeBox: false
});
marker2.events.triggerEvent("mousedown", null);
});
// Áöµµ À̹ÌÁö ÀúÀå
function saveMap(){
map.save();
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// ÁÜ ¹Ú½º
zoomBox = new TRITOPS.Control.TTMapZoomBox();
map.addControl(zoomBox);
// °Å¸®Àç±â
path = map.createMeasureControl(OpenLayers.Handler.Path, "°Å¸®Àç±â");
map.addControl(path);
// ¸éÀûÀç±â
polygon = map.createMeasureControl(OpenLayers.Handler.Polygon, "¸éÀûÀç±â");
map.addControl(polygon);
// Áö¿ì±â
eraser = new TRITOPS.Control.TTMapMeasureErase({
title: "Áö¿ì±â",
measures: [path, polygon]
});
map.addControl(eraser);
});
// ÁÜ ¹Ú½º
function setZoomBox(){
zoomBox.activate();
}
// °Å¸®Àç±â
function setPath(){
path.activate();
}
// ¸éÀûÀç±â
function setPolygon(){
polygon.activate();
}
// Áö¿ì±â
function setErase(){
eraser.trigger();
}
// È®´ë
function setZoomIn(){
map.zoomIn();
}
// Ãà¼Ò
function setZoomOut(){
map.zoomOut();
}
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
// Æ÷ÀÎÆ®
var point = new OpenLayers.Geometry.Point(953896.83022861, 1951985.8642772);
var pointStyle = {
pointRadius: 15,
graphicName: "star", // square|star|x|cross|triangle|circle
fillColor: "#00ff00",
fillOpacity: 0.5,
strokeWidth: 1,
strokeOpacity: 1,
strokeColor: "#ff0000"
};
var pointV = new OpenLayers.Feature.Vector(point, null, pointStyle);
// ¼±
var line = new OpenLayers.Geometry.LineString([
new OpenLayers.Geometry.Point(952392.83022861, 1953017.8642772),
new OpenLayers.Geometry.Point(952432.83022861, 1950521.8642772),
new OpenLayers.Geometry.Point(954416.83022861, 1950521.8642772)
]);
var lineStyle = {
strokeWidth: 10,
strokeOpacity: 0.5,
strokeColor: "#0000FF",
strokeLinecap: "square", // butt|round|square
strokeDashstyle: "solid" // dot|dash|dashdot|ongdash|longdashdot|solid
};
var lineV = new OpenLayers.Feature.Vector(line,null,lineStyle);
// Æú¸®°ï
var poly = new OpenLayers.Geometry.Polygon([
new OpenLayers.Geometry.LinearRing([
new OpenLayers.Geometry.Point(954472.83022861, 1953185.8642772),
new OpenLayers.Geometry.Point(954528.83022861, 1952113.8642772),
new OpenLayers.Geometry.Point(955776.83022861, 1951673.8642772),
new OpenLayers.Geometry.Point(956496.83022861, 1952889.8642772)
])
]);
var polygonStyle = {
strokeWidth: 2,
strokeOpacity: 1,
strokeColor: "#666666",
fillColor: "#FF0000",
fillOpacity: 0.5
};
var polygonV = new OpenLayers.Feature.Vector(poly,null,polygonStyle);
// Á¡, ¼±, Æú¸®°ï º¤ÅÍ·¹À̾î Ãß°¡
var layer = map.layerMap.VECTOR;
layer.addFeatures([pointV,lineV,polygonV]);
// Áöµµ ¹üÀ§ Àç¼³Á¤
var ex = map.layerMap.VECTOR.getDataExtent();
if(ex != null){
map.zoomToExtent(ex);
}
});
//]]>
</script>
<script type="text/javascript" src="http://gismap.ttmap.co.kr/TTMap/map.aspx?ver=1.0&key=¹ß±Þ¹ÞÀº_API_KEY" charset="utf-8"></script>
<script type="text/javascript">
//<![CDATA[
var map = null; // map object
var projWGS84 = new OpenLayers.Projection("EPSG:4326"); // WGS84 ÁÂǥü°è
var projUTMK = new OpenLayers.Projection("EPSG:5179"); // UTM-K ÁÂǥü°è
// jQuery onload
$(function(){
map = new TRITOPS.TTMap("map", {
zoom: 9
});
var lonLat = new OpenLayers.LonLat(126.978245, 37.566546);
lonLat.transform(projWGS84, projUTMK);
// Áß½ÉÁ¡
var point = new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat);
var cLonLat = lonLat.clone();
cLonLat.transform(projUTMK, projWGS84);
// ¹Ý°æ 1000m(1km)
var compLonlat = OpenLayers.Util.destinationVincenty(cLonLat, 0, 1000);
compLonlat.transform(projWGS84, projUTMK);
var radius = compLonlat.lat - lonLat.lat;
// Áß½ÉÁ¡, ¹Ý°æ, Á¡¼ö, ¹æÇâ
var circle = OpenLayers.Geometry.Polygon.createRegularPolygon(point, radius, 100, 0);
var polygonStyle = {
strokeWidth: 2,
strokeOpacity: 1,
strokeColor: "#666666",
fillColor: "#FF0000",
fillOpacity: 0.5
};
var circleFeature = new OpenLayers.Feature.Vector(circle, null, polygonStyle);
var layer = map.layerMap.VECTOR;
layer.addFeatures([circleFeature]);
// Áöµµ ¹üÀ§ Àç¼³Á¤
var ex = map.layerMap.VECTOR.getDataExtent();
if(ex != null){
map.zoomToExtent(ex);
}
});
//]]>
</script>