Merge branch 'master' of github.com:mapbox/mapbox-gl-native

This commit is contained in:
Brad Leege
2015-09-16 16:48:29 -04:00
5 changed files with 21 additions and 13 deletions

View File

@@ -270,6 +270,10 @@ Install [Android Studio](https://developer.android.com/sdk/installing/studio.htm
brew cask install android-studio
android
In the Android SDK Manager also select and install "Android Support Repository" and "Android Support Library" from "Extras":
![image](https://cloud.githubusercontent.com/assets/98601/9915837/289f398e-5c6e-11e5-9a84-ed4d08d52d1f.png)
By default, the SDK will be installed to `/usr/local/opt/android-sdk`. If you open Android Studio at this point, you may get an error message telling you that it can't find a JVM, it's because you installed a custom Java VM from Oracle. Follow [these instructions](http://tools.android.com/recent/androidstudio1rc3_releasecandidate3released) to start Android Studio. You'll wind up setting these environment variables in your .bash_profile or similar:
echo "export ANDROID_HOME=`brew --prefix android-sdk`" >> .bash_profile

View File

@@ -31,9 +31,9 @@ static NSUInteger const kStyleVersion = 8;
if (self == [MBXViewController class])
{
[[NSUserDefaults standardUserDefaults] registerDefaults:@{
@"userTrackingMode": @(MGLUserTrackingModeNone),
@"showsUserLocation": @NO,
@"debug": @NO,
@"MBXUserTrackingMode": @(MGLUserTrackingModeNone),
@"MBXShowsUserLocation": @NO,
@"MBXDebug": @NO,
}];
}
}
@@ -91,10 +91,10 @@ static NSUInteger const kStyleVersion = 8;
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSData *archivedCamera = [NSKeyedArchiver archivedDataWithRootObject:self.mapView.camera];
[defaults setObject:archivedCamera forKey:@"camera"];
[defaults setInteger:self.mapView.userTrackingMode forKey:@"userTrackingMode"];
[defaults setBool:self.mapView.showsUserLocation forKey:@"showsUserLocation"];
[defaults setBool:self.mapView.debugActive forKey:@"debug"];
[defaults setObject:archivedCamera forKey:@"MBXCamera"];
[defaults setInteger:self.mapView.userTrackingMode forKey:@"MBXUserTrackingMode"];
[defaults setBool:self.mapView.showsUserLocation forKey:@"MBXShowsUserLocation"];
[defaults setBool:self.mapView.debugActive forKey:@"MBXDebug"];
[defaults synchronize];
}
}
@@ -103,21 +103,21 @@ static NSUInteger const kStyleVersion = 8;
{
if (self.mapView) {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSData *archivedCamera = [defaults objectForKey:@"camera"];
NSData *archivedCamera = [defaults objectForKey:@"MBXCamera"];
MGLMapCamera *camera = archivedCamera ? [NSKeyedUnarchiver unarchiveObjectWithData:archivedCamera] : nil;
if (camera)
{
self.mapView.camera = camera;
}
NSInteger uncheckedTrackingMode = [defaults integerForKey:@"userTrackingMode"];
NSInteger uncheckedTrackingMode = [defaults integerForKey:@"MBXUserTrackingMode"];
if (uncheckedTrackingMode >= 0 &&
(NSUInteger)uncheckedTrackingMode >= MGLUserTrackingModeNone &&
(NSUInteger)uncheckedTrackingMode <= MGLUserTrackingModeFollowWithCourse)
{
self.mapView.userTrackingMode = (MGLUserTrackingMode)uncheckedTrackingMode;
}
self.mapView.showsUserLocation = [defaults boolForKey:@"showsUserLocation"];
self.mapView.debugActive = [defaults boolForKey:@"debug"];
self.mapView.showsUserLocation = [defaults boolForKey:@"MBXShowsUserLocation"];
self.mapView.debugActive = [defaults boolForKey:@"MBXDebug"];
}
}

View File

@@ -26,7 +26,7 @@
],
"devDependencies": {
"aws-sdk": "^2.1.47",
"mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#6cfd7eb20de77018a7f10770f56df9ce1f8a76ac",
"mapbox-gl-test-suite": "git+https://github.com/mapbox/mapbox-gl-test-suite.git#592540ebf822fd2e3cfdebbfabce92c1f5ef5b10",
"request": "^2.61.0",
"tape": "^4.2.0"
},

View File

@@ -35,11 +35,15 @@ bool CircleBucket::hasData() const {
}
void CircleBucket::addGeometry(const GeometryCollection& geometryCollection) {
const int extent = 4096;
for (auto& circle : geometryCollection) {
for(auto & geometry : circle) {
auto x = geometry.x;
auto y = geometry.y;
// Do not include points that are outside the tile boundaries.
if (x < 0 || x >= extent || y < 0 || y >= extent) continue;
// this geometry will be of the Point type, and we'll derive
// two triangles from it.
//

2
styles

Submodule styles updated: 19dde3cb1c...014e368334