2013-08-24 12 views
0

Google지도를 Corona SDK에서 사용하고 있지만지도가로드되는 동안 문제가 있습니다. 그냥 아래처럼 확대하지 않거나 명확하게 보이지 않는 것 :Corona SDK에서 Google지도가 올바르게 표시되지 않습니다.

<!DOCTYPE html> 
<html> 
<head> 
<style type="text/css"> 
html, 
body { 
height: 100%; margin: 0; padding: 0 ; 
} 
#mapContainer { 
height: 100% ; 


} 
</style> 

<script type="text/javascript" src="<script type="text/javascript" 
      src="http://maps.googleapis.com/maps/api/js?key=]]..APIkey..[[&sensor=true"></script> 
</head> 
<body> 

<div id="mapContainer"> 
</div> 


    <div id="mapContainer"> 
    </div> 

    <script type="text/javascript"> 
     var mapContainer = $("#mapContainer"); 

     map = new google.maps.Map(
            mapContainer[ 0 ], 
            { 
            zoom: 20, 
            center: new google.maps.LatLng(
                   -22.902145, 
                   -43.177049 
                   ), 

            mapTypeId: google.maps.MapTypeId.ROADMAP 
            } 
           ); 
     function addMarker(latitude, longitude, label){ 
      var im = "http://www.robotwoods.com/dev/misc/bluecircle.png" 

      var marker = new google.maps.Marker({ 
               map: map, 
               position: new google.maps.LatLng(
                       latitude, 
                       longitude 
                       ), 
               icon: im 
               }); 
      return(marker); 
     } 

     function updateMarker(marker, latitude, longitude, label){ 

      marker.setPosition(
           new google.maps.LatLng(
                 latitude, 
                 longitude 
                ) 
           ); 

      if (label){ 

       marker.setTitle(label); 

      } 
     } 

     if (navigator.geolocation) { 

      var locationMarker = null; 

      navigator.geolocation.getCurrentPosition(
                function(position){ 

                if (locationMarker){ 
                return; 
                } 

                locationMarker = addMarker(
                       position.coords.latitude, 
                       position.coords.longitude, 
                       "Initial Position" 
                       ); 

                }, 
                function(error){ 
                }, 
                { 
                timeout: (5 * 1000), 
                maximumAge: (1000 * 60 * 15), 
                enableHighAccuracy: true 
                } 
                ); 

      var positionTimer = navigator.geolocation.watchPosition(
                    function(position){ 

                    updateMarker(
                       locationMarker, 
                       position.coords.latitude, 
                       position.coords.longitude, 
                       "Updated/Accurate Position" 
                       ); 

                    } 
                    ); 


      setTimeout(
         function(){ 
         navigator.geolocation.clearWatch(positionTimer); 
         }, 
         (1000 * 60 * 5) 
         ); 


var uri 

if(]]..chk..[[) 
uri ="http://192.168.1.202/streetculture/images/1/img1.png" 
var image = new google.maps.MarkerImage(uri, 
             new google.maps.Size(50, 70), 
             new google.maps.Point(0,0), 
             new google.maps.Point(20, 28) 
             ); 
       ]]..markerString..[[ 


if(]]..chk2..[[) 
uri ="http://192.168.1.202/streetculture/images/1/img_map_pin_pink.png" 
    var image = new google.maps.MarkerImage(uri, 
              new google.maps.Size(50, 70), 
              new google.maps.Point(0,0), 
              new google.maps.Point(20, 28) 
              ); 
    ]]..markerString..[[ 



} 
</script> 
</body> 
</html> 

내 웹보기에서이 HTML 파일을로드 오전 : 여기

image

는 HTML 파일에 내 코드 블록이다 . 나는이 문제를 해결해야

답변

0

는 우리는 웹 페이지

모바일 장치에 대한

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> 

을 둘 필요

관련 문제