-1
this과 같은 내 페이지는 StyledMarker를 사용하여 정상적으로 작동했지만, 한 달 전 (?)부터 실패합니다. 파이어 폭스 콘솔 내가이 스크립트의 최근 변화에 대한 참조를 찾을 수 없어Google지도 StyledMarker가 더 이상 작동하지 않습니다.
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script type="text/javascript" src="https://google-maps-utility-library-v3.googlecode.com/svn/trunk/styledmarker/src/StyledMarker.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
을 포함
function initialize() { var mapCanvas = document.getElementById('map'); var mapOptions = {center:new google.maps.LatLng(latitudeMid,longitudeMid),mapTypeId:google.maps.MapTypeId.ROADMAP,streetViewControl:false,mapTypeControl:true,scaleControl:true,scaleControlOptions:{position:google.maps.ControlPosition.TOP_RIGHT}}; usefulWidth=window.innerWidth-50; map = new google.maps.Map(mapCanvas, mapOptions); var i; var insertion; var previousMarker; var previousZindex; document.getElementById('zoemCheck').checked=false; for (i = 0; i < fotoCount; i++) {
var myLatLng =new google.maps.LatLng(Latituden[i], Longituden[i]);
//===========================================================================================================================
var marker = new StyledMarker({styleIcon:new StyledIcon(StyledIconTypes.MARKER,{color:'00ff00',text:Letters[i]}),position:myLatLng,map:map});
//===========================================================================================================================
bounds.extend(myLatLng);
marker.set('zIndex', -i);
marker.myIndex = i;
markers.push(marker);
google.maps.event.addListener(marker, 'click', function() {
if(previousMarker!=null)
{
previousMarker.styleIcon.set('color', '00ff00');
previousMarker.set('zIndex', previousZindex);
previousZindex=this.zIndex;
}
this.styleIcon.set('color', 'ff0000');
this.set('zIndex', google.maps.Marker.MAX_ZINDEX+1);
thisMarker=this.myIndex;
if (zoem==1) //moet nu inzoemen
{
map.setCenter(new google.maps.LatLng(Latituden[thisMarker], Longituden[thisMarker]));
map.setZoom(18);
}
if (zoem==2) //moet nu uitzoemen
{
map.setCenter(new google.maps.LatLng(latitudeMid,longitudeMid));
map.setZoom(myZoom);
zoem=0;
}
var insertion="";
insertion='<img src=\"http://www.pdavis.nl/Ams/'.concat(Bestanden[this.myIndex],'.jpg \" id=\"myImg\" onLoad=\"imgEvent()\"></img>');
insertion=insertion.concat('<table class=width100><tr><td>Bestand: ',Bestanden[this.myIndex],'</td><td class=pright>Lokatie: ',Latituden[this.myIndex],' °N., ',Longituden[this.myIndex],' °E. (',Letters[this.myIndex],')</td>');
insertion=insertion.concat('<td class=pright>Genomen: ',Datums[this.myIndex],'</td></tr><td colspan=3>Object: ',Objecten[this.myIndex],'</td></table>');
$('#photo').html(insertion);
previousMarker=this;
document.getElementById('myImg').style.width = '100%';
}); google.maps.event.addDomListener(document.getElementById('volgende'), 'click', nextEvent); google.maps.event.addDomListener(document.getElementById('vorige'), 'click', previousEvent); google.maps.event.addDomListener(document.getElementById('zoemer'), 'click', zoemerEvent); google.maps.event.addDomListener(document.getElementById('totaal'), 'click', totaalEvent); } map.fitBounds(bounds); google.maps.event.trigger(markers[0], 'click'); document.getElementById('header').style.width = (window.innerWidth-20)
+ "px"; document.getElementById('vorige').style.left = ((window.innerWidth/2)-295) + "px"; document.getElementById('volgende').style.left = document.getElementById('vorige').offsetLeft + 90 + "px"; document.getElementById('selectie').style.left = (window.innerWidth-910) + "px"; if (window.innerWidth<1920)
{
document.getElementById('map').style.width = 0.40 * usefulWidth + 'px';
document.getElementById('photo').style.width = 0.60 * usefulWidth + 'px';
} FillSelecters(); }
여기
ReferenceError: StyledMarker is not defined
제공합니다. 다른 스크립트를 포함해야합니까?
고맙습니다. 나는 당신의 카피 제안을 수행했고, 모두는 다시 일하고있다. –