File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1345,13 +1345,13 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
13451345 if ( marker . icon ) {
13461346 // for markers from url see UrlMarker in https://github.com/mapbox/mapbox-gl-native/issues/5370
13471347 if ( marker . icon . startsWith ( 'res://' ) ) {
1348- let cached = this . iconCache [ marker . iconPath ] ;
1348+ let cached = this . iconCache [ marker . icon ] ;
13491349 if ( ! cached ) {
13501350 const resourcename = marker . icon . substring ( 6 ) ;
13511351 const res = Utils . ad . getApplicationContext ( ) . getResources ( ) ;
13521352 const identifier = res . getIdentifier ( resourcename , 'drawable' , Utils . ad . getApplication ( ) . getPackageName ( ) ) ;
13531353 if ( identifier !== 0 ) {
1354- cached = this . iconCache [ marker . iconPath ] = iconFactory . fromResource ( identifier ) ;
1354+ cached = this . iconCache [ marker . icon ] = iconFactory . fromResource ( identifier ) ;
13551355 }
13561356 }
13571357 if ( cached ) {
Original file line number Diff line number Diff line change @@ -2810,7 +2810,7 @@ export class Mapbox extends MapboxCommon implements MapboxApi {
28102810
28112811 const layer = theMap . style . layerWithIdentifier ( name ) ;
28122812
2813- resolve ( new Layer ( layer ) ) ;
2813+ resolve ( layer ? new Layer ( layer ) : null ) ;
28142814 } catch ( ex ) {
28152815 if ( Trace . isEnabled ( ) ) {
28162816 CLog ( CLogTypes . info , 'Error in mapbox.getLayer: ' + ex ) ;
You can’t perform that action at this time.
0 commit comments