ti.map icon indicating copy to clipboard operation
ti.map copied to clipboard

FragmentManager: No view found for id 0x2 (unknown) for fragment SupportMapFragment

Open fede1295 opened this issue 5 years ago • 3 comments

App crash when I add the module="ti.map" to a View:

<View id="mapView" module="ti.map"> <Annotation id='point'/> </View>

ti.map version 4.5.0 titanium sdk version 8.2.0

fede1295 avatar Oct 30 '19 15:10 fede1295

Did you try the syntax from: http://docs.appcelerator.com/platform/latest/#!/api/Modules.Map

<Alloy>
    <Window>
        <Module id="mapview" module="ti.map" onClick="report" method="createView">
            <Annotation id="appcHQ" myId="1337" />
        </Module>
    </Window>
</Alloy>

with alloy.js

Alloy.Globals.Map = require('ti.map');

m1ga avatar Nov 02 '19 14:11 m1ga

Hi Michael,

Im getting same error with ti.map on android, just started out of the blue.

[ERROR] TiExceptionHandler: (main) [6,44061] No view found for id 0x1 (unknown) for fragment SupportMapFragment{91d3b96 (f118b8e7-cf16-4c99-8835-618101e85a9e) id=0x1}

Im using classic ti for this controller, 9.0.0.GA, ti.map v5.0.1. I've not changed anything, seems to happen when I add the mapview to my view. Works ok on IOS.

Any thoughts on what the issue might be?

    var map = require("ti.map");

mapview = map.createView({
	mapType : APP.MAP.NORMAL_TYPE,
	left : 12,
	top : 0,
	right : 12,
	bottom : args.payload ? 0 : 12,
	regionFit : true,
	accessibilityLabel: "pharmacySelect-mapView"
});

view.add(mapview);

ericpolkadoc avatar Oct 08 '20 18:10 ericpolkadoc

Michael,

Update on my issue, thought I would add it here for anyone else that might need it.

I had a console.log that was failing for some reason, I think the object was either undefined or null when the map was being generated in my view.

It looks like when my console.log error'd, it wasn't being logged in terminal, and caused the map to fail, with the error message I saw. So the map error I was seeing was misleading, I was not seeing the actual error.

Thanks

ericpolkadoc avatar Oct 08 '20 21:10 ericpolkadoc