Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ui-mapbox/index.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1345,13 +1345,13 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
if (marker.icon) {
// for markers from url see UrlMarker in https://github.com/mapbox/mapbox-gl-native/issues/5370
if (marker.icon.startsWith('res://')) {
let cached = this.iconCache[marker.iconPath];
let cached = this.iconCache[marker.icon];
if (!cached) {
const resourcename = marker.icon.substring(6);
const res = Utils.ad.getApplicationContext().getResources();
const identifier = res.getIdentifier(resourcename, 'drawable', Utils.ad.getApplication().getPackageName());
if (identifier !== 0) {
cached = this.iconCache[marker.iconPath] = iconFactory.fromResource(identifier);
cached = this.iconCache[marker.icon] = iconFactory.fromResource(identifier);
}
}
if (cached) {
Expand Down
2 changes: 1 addition & 1 deletion src/ui-mapbox/index.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3119,7 +3119,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {

const layer = theMap.style.layerWithIdentifier(name);

resolve(new Layer(layer));
resolve(layer ? new Layer(layer) : null);
} catch (ex) {
if (Trace.isEnabled()) {
CLog(CLogTypes.info, 'Error in mapbox.getLayer: ' + ex);
Expand Down