Skip to content

Commit

Permalink
Failed to bind EAGLDrawable #196
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyVerbruggen committed Jan 20, 2018
1 parent 054ef73 commit 0eb4971
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Change Log

## [3.3.0](https://github.com/EddyVerbruggen/nativescript-mapbox/tree/3.3.0) (2018-01-19)
## [3.3.0](https://github.com/EddyVerbruggen/nativescript-mapbox/tree/3.3.0) (2018-01-20)
[Full Changelog](https://github.com/EddyVerbruggen/nativescript-mapbox/compare/3.2.0...3.3.0)

**Fixed bugs:**

- Console output query [\#177](https://github.com/EddyVerbruggen/nativescript-mapbox/pull/177)
- Console output query [\#177](https://github.com/EddyVerbruggen/nativescript-mapbox/issues/177)

**Implemented enhancements:**

- listOfflineRegions fails on Android if no map has been shown [\#172](https://github.com/EddyVerbruggen/nativescript-mapbox/pull/172)
- How to get lat long of userlocation from mapbox [\#180](https://github.com/EddyVerbruggen/nativescript-mapbox/pull/180)
- listOfflineRegions fails on Android if no map has been shown [\#172](https://github.com/EddyVerbruggen/nativescript-mapbox/issues/172)
- How to get lat long of userlocation from mapbox [\#180](https://github.com/EddyVerbruggen/nativescript-mapbox/issues/180)
- Failed to bind EAGLDrawable [\#196](https://github.com/EddyVerbruggen/nativescript-mapbox/issues/196)


## [3.2.0](https://github.com/EddyVerbruggen/nativescript-mapbox/tree/3.2.0) (2018-01-13)
Expand Down
10 changes: 10 additions & 0 deletions src/mapbox.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ export class MapboxView extends MapboxViewBase {
setTimeout(drawMap, settings.delay ? settings.delay : 0);
}
}

public onLayout(left: number, top: number, right: number, bottom: number): void {
// in case the user wrapped the map in a layout that doesn't specify height, simply 'auto-grow' the map ourselves
if (this.ios.layer.bounds.size.width === 0 || this.ios.layer.bounds.size.height === 0) {
if (this.ios.superview) {
this.mapView.frame = CGRectMake(0, 0, this.ios.superview.layer.bounds.size.width, this.ios.superview.layer.bounds.size.height);
}
}
super.onLayout(left, top, right, bottom);
}
}

/*************** XML definition END ****************/
Expand Down

0 comments on commit 0eb4971

Please sign in to comment.