Closed Timileyin105 closed 1 year ago
@tafelnl your help will be appreciated on this Thanks
Unfortunately I can't help without a minimal basic reproduction
hello @tafelnl
this is my code
just a simple map create throws the error on ios
//component.html
<div id="map" [style]="{height: mapHeight}" #map></div>
//component.ts
createMap() {
if (Capacitor.getPlatform() === 'web') {
return;
}
const { longitude, latitude } = this.cameraPosition;
const element = this.map.nativeElement;
const boundingRectEl = element.getBoundingClientRect();
await CapacitorGoogleMaps.createMap({
element: boundingRectEl,
boundingRect: {
width: Math.round(boundingRectEl.width),
height: Math.round(boundingRectEl.height),
x: Math.round(boundingRectEl.x),
y: Math.round(boundingRectEl.y),
},
cameraPosition: {
zoom: 14,
target: {
latitude, longitude
}
},
preferences: {
liteMode: false,
appearance: {
style: mapStyle,
isMyLocationDotShown: true,
type: this.mapService.getMapTypeInt()
},
controls: {
isCompassButtonEnabled: false,
isMyLocationButtonEnabled: true
}
}
}).then(map => {
this.mapService.currentMapId = map.googleMap.mapId;
element.setAttribute("data-maps-id", map.googleMap.mapId);
}, err => {
console.log(err);
})
}
it works normal in android (Android studio) but ios(xcode emulator) i have error and also to archive peoject i have error
Unfortunately with such an example people will not be able to help you. Please see here how to create a reproduction:
https://minimum-reproduction.wtf/ https://stackoverflow.com/help/minimal-reproducible-example https://github.com/ionic-team/capacitor/blob/HEAD/CONTRIBUTING.md#creating-a-code-reproduction
Closing as stale
Describe the bug A app works fine on android platform but in ios the app crashes whenever the map is about to be loaded when app is lauched everthing works fine but when page with the map is opened it crahed i have exc_bad_access i have tried bot the latest version of xocode (14.3) and 14.1 still same
To Reproduce
1.create sample app for ios 2.run to see on simulator
Screenshots