테스트 사이트 - 개발 중인 베타 버전입니다

구글지도 질문좀드리겠습니다 채택완료

제이쿼링 8년 전 조회 5,694

안녕하세요 질문좀 드리겠습니다

아래사진보시면 동그라미 부분에 저버튼 부분이요

따로 저부분만 a 링크나 이런걸로 하고싶은데 

저기 버튼 소스 아시는분 계시나요 ㅠㅠ?

 


 

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
k
8년 전

소스를 볼수있는 도메인을 입력해주시면 도움드릴게요~ 

로그인 후 평가할 수 있습니다

답변에 대한 댓글 3개

제이쿼링
8년 전
<td><!--지도부분 -->
<div id="mgmap"></div>
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=ko®ion=kr&key=AIzaSyBZJaZ4yjdbM6020UjVP78zno0PDplE-ng"></script> <script type="text/javascript">
var map;
var geocoder;
var marker;
var ymakerimg = '<?php echo $board_skin_url ?>/img/mapicon001.png';

function mgminfomap(){
geocoder = new google.maps.Geocoder();
var latlng = new google.maps.LatLng('<?=$write[wr_3]?>','<?=$write[wr_4]?>'); //초기화면부분

var mgmapOption = {
zoom : 16,
center: latlng,

mapTypeId: google.maps.MapTypeId.ROADMAP
}

map = new google.maps.Map(document.getElementById('mgmap'), mgmapOption);

marker = new google.maps.Marker({
position:latlng,
icon : ymakerimg,
map:map
});

// 이동시 좌표와 주소 변경이벤트
google.maps.event.addListener(map, 'dragend', function(){
moveLatlng();
changeAddress();
});

};

// 이동시 좌표구하기
function moveLatlng(){
var mll=map.getCenter();
document.getElementById('wr_3').value = mll.lat();
document.getElementById('wr_4').value = mll.lng();
addMark(mll.lat(), mll.lng());
}

function changeAddress(){
geocoder.geocode( { 'location': map.getCenter()}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {

var str="";
for(var i=3; i>=0; i--){
str += " "+results[0].address_components[i].short_name;

}
document.getElementById('wr_1').value=str;
document.getElementById('wr_2').value=str;

}
});
}


function codeAddress(){
var address = document.getElementById('wr_1').value;
// 주소입력안했을때 경고창
if(address=='검색할 주소를 입력하십시오.' || address==''){
alert('검색할 주소를 입력하십시오.');
document.getElementById("wr_1").value='';
document.getElementById("wr_1").focus();
return;
}

geocoder.geocode({'address':address}, function(results, status){
if(status == google.maps.GeocoderStatus.OK){
map.setCenter(results[0].geometry.location);
addMark(results[0].geometry.location.lat(), results[0].geometry.location.lng());
document.getElementById('wr_2').value = results[0].formatted_address;
document.getElementById('wr_3').value = results[0].geometry.location.lat();
document.getElementById('wr_4').value = results[0].geometry.location.lng();


}
});

}
function addMark(lat,lng){
if(typeof marker!='undefined'){
marker.setMap(null);
}

marker = new google.maps.Marker({
map: map,
icon : ymakerimg,
position: new google.maps.LatLng(lat,lng)
});
var infowindow = new google.maps.InfoWindow({

});


}
function moveMarker(lat, lng){
marker.setPosition(lat, lng);

}

function mypoint(){
// 나의위치 찾아보기
if (navigator.geolocation) {
browserSupportFlag = true;
navigator.geolocation.getCurrentPosition(function(position){
var initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);

// 좌표를 주소로변환
geocoder.geocode({'latLng' : initialLocation}, function(results, status)

{

if (status == google.maps.GeocoderStatus.OK) {

if (results[1]) {

document.getElementById('wr_2').value = results[3].formatted_address;
document.getElementById('wr_1').value = results[3].formatted_address;

}

}

});

document.getElementById('wr_3').value = position.coords.latitude;
document.getElementById('wr_4').value = position.coords.longitude;

map.setCenter(initialLocation);
marker.setPosition(initialLocation);
}, function(){
handleNoGeolocation(browserSupportFlag);
});

}
else if (google.gears) {
browserSupportFlag = true;
var geo = google.gears.factory.create('beta.geolocation');
geo.getCurrentPosition(function(position){
var initialLocation = new google.maps.LatLng(position.latitude, position.longitude);

// 좌표를 주소로변환
geocoder.geocode({'latLng' : initialLocation}, function(results, status)

{

if (status == google.maps.GeocoderStatus.OK) {

if (results[1]) {

document.getElementById('wr_2').value = results[3].formatted_address;
document.getElementById('wr_1').value = results[3].formatted_address;

}

}

});
제이쿼링
8년 전
document.getElementById('wr_3').value = position.coords.latitude;
document.getElementById('wr_4').value = position.coords.longitude;

map.setCenter(initialLocation);
marker.setPosition(initialLocation);
}, function(){
handleNoGeolocation(browserSupportFlag);
});

}
else if (google.gears) {
browserSupportFlag = true;
var geo = google.gears.factory.create('beta.geolocation');
geo.getCurrentPosition(function(position){
var initialLocation = new google.maps.LatLng(position.latitude, position.longitude);

// 좌표를 주소로변환
geocoder.geocode({'latLng' : initialLocation}, function(results, status)

{

if (status == google.maps.GeocoderStatus.OK) {

if (results[1]) {

document.getElementById('wr_2').value = results[3].formatted_address;
document.getElementById('wr_1').value = results[3].formatted_address;

}

}

});

document.getElementById('wr_3').value = position.coords.latitude;
document.getElementById('wr_4').value = position.coords.longitude;

map.setCenter(initialLocation);
marker.setPosition(initialLocation);
}, function(){
handleNoGeoLocation(browserSupportFlag);
});
// Browser doesn't support Geolocation
}
else {
browserSupportFlag = false;
handleNoGeolocation(browserSupportFlag);
}
}

google.maps.event.addDomListener(window, 'load', mgminfomap);
</script>
<!-- 지도끝 -->
제이쿼링
8년 전
http://sir.kr/g5_skin/9879?sfl=wr_subject%7C%7Cwr_content&stx=%EC%A7%80%EB%8F%84&page=2

이스킨입니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인