Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (device)
Viewing all articles
Browse latest Browse all 250

App keeps crashing when adding mapview

$
0
0

Recently, i have tried to implement mapview into my app. However, the app keep crashing whenever the google map is displaying and it keep gives me error

msg:java.lang.IllegalStateException: Map size should not be 0. Most likely, layout has not yet occured for the map view
first i created the mapview
var samplemap  = MapModule.createView({
            mapType:MapModule.NORMAL_TYPE,
            userLocation:true,
            width:Ti.UI.FILL,
            height:Ti.UI.FILL,
            visible:false,
        });
 
samplemap = createGoogleMapView();
samplemap.setEnabled(false);
samplemap.setTouchEnabled(false);
samplemap.setEnableZoomControls(false);
samplemap.setUserLocationButton(false);
then i set the annotations into mapview
samplemap.addAnnotations(annotations);
samplemap.setRegion(region);
samplemap.show();
I have tested this app in htc incredible s and htc one. HTC incredible will crash frequently while htc one will crash for the first time only.

Any ideas?


Viewing all articles
Browse latest Browse all 250

Latest Images

Trending Articles





Latest Images