Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Google maps trouble on iphone.

My google map on iphone seems to be in a weird reload cycle. It flickers badly, and sometimes it doesn't even display on the page. As it stands right now, it isn't even usable. The problem exists on android too, but it is MUCH better on android than it is on the iphone. On android it flickers briefly, but it doesn't crash the app and is still usable. On my dev machine, everything works fine.

The project is already shared with support. I'd be very grateful if you guys can help.

My google maps code in its entirety: (I don't believe this to be the problem).

Code: Select all

 var mapElement; 
 var mapOptions; 
 var map; 
 var presentLocation; 
 var bodyicon = Appery.getImagePath('crimescene.png'); 
 var policeicon = Appery.getImagePath('police.png'); 
 var personicon = Appery.getImagePath('male-2.png'); 
 function initialize()  
 { 
     console.log('building map.') 
     presentLocation = getPresentLocation(); 

     var mapOptions = { 
       zoom: 12, 
       center: presentLocation, 
       mapTypeId: google.maps.MapTypeId.ROADMAP 
     }; 

     map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); 

     var marker = new google.maps.Marker(    { position: presentLocation, map: map, title:'You are Here.', icon:personicon }); 
     //var marker = new google.maps.Marker(    { position: presentLocation, map: map, title:'Your body is Here.', icon:bodyicon }); 

     var request = { 
       location: presentLocation, 
       radius: 20000, 
       types: ['police'] 
     }; 

     var service = new google.maps.places.PlacesService(map); 
     service.nearbySearch(request,   function callback(results, status) 
                                     { 
                                         if (status == google.maps.places.PlacesServiceStatus.OK)  
                                         { 
                                             //console.log('Police Stations:', results) 
                                             results.forEach(    function(element, i) 
                                                                 { 
                                                                     //console.log('Creating marker for [' + i + ']', element ) 
                                                                     createMarker(element); 
                                                                 }); 
                                         } 
                                     }); 

     console.log('done.'); 
 } 

 function createMarker(place)  
 { 
     //console.log(place); 
     if(typeof(place) == 'undefined') return; 

     var placeLoc = place.geometry.location; 
     var info = place.name; 
     var marker = new google.maps.Marker( { map: map, position: place.geometry.location, icon:policeicon, title:info } ); 
     google.maps.event.addListener 
     ( 
         marker,  
         'click',  
         function()  
         {   infowindow.setContent(place.name);  
             infowindow.open(map, this);  
         }  
     ); 
 } 

 function getPresentLocation() 
 { 
     var lat = localStorage['localLat']; 
     var lng = localStorage['localLong']; 
     return new google.maps.LatLng(lat,lng); 
 }
Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Google maps trouble on iphone.

Hello! Could you clarify what iOS/Android versions are on your devices? Also tell us your app name.

Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Google maps trouble on iphone.

The app is secret chaperone. the adroid version I am testing against is 4.1, and the ios version is 6.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Google maps trouble on iphone.

What are the steps to reproduce?

Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Google maps trouble on iphone.

You just need to log in... I can send you some credentials? Should I send to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a?

Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Google maps trouble on iphone.

(that's done too.) I can send to a different email if neccessary.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Google maps trouble on iphone.

Thank you! I've registered already. How can I get to the screen with map?

Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Google maps trouble on iphone.

The map is at the bottom of the home screen after you log in. Under the 'Upcoming events' collapsible block.

Michael Martinez
Posts: 0
Joined: Fri Aug 30, 2013 7:00 pm

Google maps trouble on iphone.

If you don't see it, that would of course be part of the problem :)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Google maps trouble on iphone.

Ok, looks like we don't have that part of problem:) I see it now. We'll test it on devices, but it takes time usually. Someone will get back with update.

Return to “Issues”