[FAQ] 지도/로컬 API 문의 전 꼭 읽어 주세요.
팝업에서 카카오맵 오픈하면 위도,경도 표시한 대로 오픈되어야되는데
좌측위쪽에서 흘러나오듯이 오픈이 됩니다.
------------------------------------------jsp---------------------------------------------
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" trimDirectiveWhitespaces="true" %> <%@ include file="../common/include-meta.jsp" %>
<%@ include file="../common/include-menu.jsp" %>
<div class="modal fade" id="gpsTarget" data-backdrop="static" data-keyboard="false" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
<!-- START 컨텐츠 박스 영역 -->
<div class="row cnt-main-lst box-outter">
<!-- S: 현장위치 지도 -->
<div class="field-map-wrapper" style="width: 100%; padding-bottom: 20px;">
<div class="row field-map-box">
<div class="col">
<div id="mapPop" style="width: 100%; height: 450px;"></div>
</div>
</div>
</div>
<!-- E: 현장위치 지도 -->
</div>
<!-- END 컨텐츠 박스 영역 -->
</div>
<%@ include file="../common/include-footer.jsp" %>
------------------------------------------js---------------------------------------------
function startup() {
gpsMntrTarget.init();
gpsMntrTarget.open(“DEF000”, “TRK-00001”, “85323”);
}
var gpsMntrTarget = new function()
{
const APIURL_LIST = ctx + “/v1/trk/mntr/{0}”;
var _mapPop = null;
this.init = function() {
kakao.maps.load(function() {
// 지도확대/축소
var tmpyx = nvl(MAP_CENTER_GPS).split(",");
_fldLatY = nvl(tmpyx[0], PICK_FIELD_LATY);
_fldLngX = nvl(tmpyx[1], PICK_FIELD_LNGX);
// 지도객체 로드
_mapPop = mapcore.init("mapPop", _fldLngX, _fldLatY, mapcore.MAP_STD_ZOOM);
});
};
this.open = function(fieldId, devId, devNm) {
$("#gpsTarget").modal({ show:true, backdrop:"static", keyboard:true });
};
};