이 페이지에서 이상한 문제가 있습니다 : http://www.bluprintliving.com/locations 표시하려는 표시자가 Firefox에 표시되지만 보이지 않는 것 같습니다. Chrome/Safari 또는 IE에서 javascript 오류가 없으므로이 문제를 어디에서 디버깅해야하는지 잘 모르겠습니다.크롬, 사파리 및 인터넷 익스플로러가 아닌 Firefox에서 Google지도 표시자를 표시하는 이유
코드는 두 부분으로 나뉩니다.
FIRST MAP
<div id="map" class="location-map"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(51.50788772102843,-0.1050567626953125), 11);
usePointFromPostcode("WC1N 2PL", setCenterToPointLondon);
usePointFromPostcode("EC1M 5RR", setCenterToPointLondon);
//]]>
</script>
SECOND MAP
:처럼 보이는 그것에 대한 섹션이 페이지의 각 맵에 대한 http://www.bluprintliving.com/js/local-area-gmaps.jsvar localSearch = new GlocalSearch();
var global_point;
var icon = new GIcon();
icon.image = "http://www.google.com/mapfiles/marker.png";
icon.shadow = "http://www.google.com/mapfiles/shadow50.png";
icon.iconSize = new GSize(20, 34);
icon.shadowSize = new GSize(37, 34);
icon.iconAnchor = new GPoint(10, 34);
function usePointFromPostcode(postcode, callbackFunction) {
localSearch.setSearchCompleteCallback(null,
function() {
if (localSearch.results[0])
{
var resultLat = localSearch.results[0].lat;
var resultLng = localSearch.results[0].lng;
var point = new GLatLng(resultLat,resultLng);
callbackFunction(point);
global_point = point;
}else{
alert("Postcode not found!");
}
});
localSearch.execute(postcode + ", UK");
}
function setCenterToPointLondon(point) {
//map.setCenter(point, 15);
map.setCenter(new GLatLng(51.50788772102843,-0.1050567626953125), 11);
var marker = new GMarker(point,icon);
map.addOverlay(marker);
}
function setCenterToPoint(point) {
map.setCenter(point, 15);
var marker = new GMarker(point,icon);
map.addOverlay(marker);
}
function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
그런 다음 JS 파일 첫 번째
<div id="map-no-5-doughty-street" class="location-map"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap2(document.getElementById("map-no-5-doughty-street"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(51.50788772102843,-0.1050567626953125), 11);
usePointFromPostcode("WC1N2PL", setCenterToPoint);
//]]>
</script>
위치 성장에 페이지가 잠재적으로 더지도로 성장할 수 있도록
<div id="map-turnmill-street" class="location-map"></div>
<script type="text/javascript">
//<![CDATA[
var map = new GMap2(document.getElementById("map-turnmill-street"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(51.50788772102843,-0.1050567626953125), 11);
usePointFromPostcode("EC1M5RR", setCenterToPoint);
//]]>
</script>
지금이 모두 동적으로 생성 * THIRD MAP.
이 모두는 Firefox에서 예상대로 작동하지만 다른 브라우저에서는 작동하지 않습니다. 마커가 표시되지 않으며 센터링이 다른 브라우저에서도 해제 된 것처럼 보입니다.
도움말! 부디! :이 문제와 디버그를 쉽게 알 수 있도록 내가 한 페이지에 모든 코드를 배치 한
사전에
감사
UPDATE : 다시 http://www.bluprintliving.com/google-maps.php
감사