summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2015-10-23 13:42:07 +1100
committerMinh Nguyễn <mxn@1ec5.org>2015-10-30 13:09:04 -0700
commitabf93c008b993f178df327e7681418df51e72844 (patch)
treeb57b3f654cb262ee7d5e834610f8fa95ed8603c1
parentddc4251074dae9115d6e252099ec04995188e29a (diff)
downloadqtlocation-mapboxgl-abf93c008b993f178df327e7681418df51e72844.tar.gz
[core] Remove bundled styles.
Fixes #2239
-rw-r--r--.gitmodules4
-rw-r--r--android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java12
-rw-r--r--android/MapboxGLAndroidSDK/src/main/res/values/strings.xml12
-rw-r--r--gyp/styles.gypi35
-rw-r--r--ios/app/MBXViewController.mm2
-rw-r--r--ios/app/mapboxgl-app.gypi1
-rw-r--r--ios/benchmark/MBXBenchViewController.mm2
-rw-r--r--ios/benchmark/benchmark-ios.gypi1
-rw-r--r--linux/mapboxgl-app.gypi1
-rw-r--r--macosx/mapboxgl-app.gypi1
-rw-r--r--platform/android/mapboxgl-app.gypi1
-rw-r--r--platform/default/default_styles.cpp12
-rw-r--r--platform/ios/MGLMapView.mm72
-rwxr-xr-xscripts/android/run.sh3
-rwxr-xr-xscripts/ios/package.sh2
-rwxr-xr-xscripts/linux/run.sh3
-rw-r--r--scripts/main.mk4
-rwxr-xr-xscripts/node/run.sh3
-rwxr-xr-xscripts/osx/run.sh3
m---------styles0
20 files changed, 56 insertions, 118 deletions
diff --git a/.gitmodules b/.gitmodules
index 2aa6d52be9..b87049ba1d 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2,10 +2,6 @@
path = .mason
url = https://github.com/mapbox/mason.git
-[submodule "styles"]
- path = styles
- url = https://github.com/mapbox/mapbox-gl-styles.git
-
[submodule "test/ios/KIF"]
path = test/ios/KIF
url = https://github.com/kif-framework/KIF.git
diff --git a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
index e2dad97832..04c7a31380 100644
--- a/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
+++ b/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/constants/Style.java
@@ -28,27 +28,27 @@ public class Style {
/**
* Mapbox Streets: A complete basemap, perfect for incorporating your own data.
*/
- public static final String MAPBOX_STREETS = "asset://styles/streets-v8.json";
+ public static final String MAPBOX_STREETS = "mapbox://styles/mapbox/streets-v8";
/**
* Emerald: A versatile style, with emphasis on road networks and public transit.
*/
- public static final String EMERALD = "asset://styles/emerald-v8.json";
+ public static final String EMERALD = "mapbox://styles/mapbox/emerald-v8";
/**
* Light: Subtle light backdrop for data visualizations.
*/
- public static final String LIGHT = "asset://styles/light-v8.json";
+ public static final String LIGHT = "mapbox://styles/mapbox/light-v8";
/**
* Dark: Subtle dark backdrop for data visualizations.
*/
- public static final String DARK = "asset://styles/dark-v8.json";
+ public static final String DARK = "mapbox://styles/mapbox/dark-v8";
/**
* Satellite: A beautiful global satellite and aerial imagery layer.
*/
- public static final String SATELLITE = "asset://styles/satellite-v8.json";
+ public static final String SATELLITE = "mapbox://styles/mapbox/satellite-v8";
/**
* Satellite Streets: Global satellite and aerial imagery with unobtrusive labels.
*/
- public static final String SATELLITE_STREETS = "asset://styles/satellite-hybrid-v8.json";
+ public static final String SATELLITE_STREETS = "mapbox://styles/mapbox/satellite-hybrid-v8";
}
diff --git a/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml b/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml
index 0de0715be6..eadcdcc043 100644
--- a/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml
+++ b/android/MapboxGLAndroidSDK/src/main/res/values/strings.xml
@@ -9,10 +9,10 @@
<string name="infoWindowAddress">Address</string>
<!-- these are public -->
- <string name="style_mapbox_streets">asset://styles/streets-v8.json</string>
- <string name="style_emerald">asset://styles/emerald-v8.json</string>
- <string name="style_light">asset://styles/light-v8.json</string>
- <string name="style_dark">asset://styles/dark-v8.json</string>
- <string name="style_satellite">asset://styles/satellite-v8.json</string>
- <string name="style_satellite_streets">asset://styles/satellite-hybrid-v8.json</string>
+ <string name="style_mapbox_streets">mapbox://styles/mapbox/streets-v8</string>
+ <string name="style_emerald">mapbox://styles/mapbox/emerald-v8</string>
+ <string name="style_light">mapbox://styles/mapbox/light-v8</string>
+ <string name="style_dark">mapbox://styles/mapbox/dark-v8</string>
+ <string name="style_satellite">mapbox://styles/mapbox/satellite-v8</string>
+ <string name="style_satellite_streets">mapbox://styles/mapbox/satellite-hybrid-v8</string>
</resources>
diff --git a/gyp/styles.gypi b/gyp/styles.gypi
deleted file mode 100644
index 06121f2d4c..0000000000
--- a/gyp/styles.gypi
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'touch_styles',
- 'type': 'none',
- 'hard_dependency': 1,
- 'actions': [
- {
- 'action_name': 'Touch Stylesheet Directory',
- 'inputs': ['../styles'],
- 'outputs': ['<(SHARED_INTERMEDIATE_DIR)/'], # need to specify a distinct directory
- 'action': ['touch', '../styles'],
- }
- ],
- },
- {
- 'target_name': 'bundle_styles', # use this only for targets that create an App bundle
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [ 'touch_styles' ], # required for xcode http://openradar.appspot.com/7232149
- 'direct_dependent_settings': {
- 'mac_bundle_resources': [ '../styles/styles' ],
- }
- },
- {
- 'target_name': 'copy_styles', # use this only for targets that don't create an App bundle
- 'type': 'none',
- 'hard_dependency': 1,
- 'dependencies': [ 'touch_styles' ],
- 'direct_dependent_settings': {
- 'copies': [{ 'files': [ '../styles/styles' ], 'destination': '<(PRODUCT_DIR)' }],
- }
- },
- ]
-}
diff --git a/ios/app/MBXViewController.mm b/ios/app/MBXViewController.mm
index 6a04b7fa24..c8a305b3c3 100644
--- a/ios/app/MBXViewController.mm
+++ b/ios/app/MBXViewController.mm
@@ -326,7 +326,7 @@ static NSUInteger const kStyleVersion = 8;
self.styleIndex = (self.styleIndex + 1) % (sizeof(MBXAvailableStyles) / sizeof(MBXAvailableStyles[0]));
self.mapView.styleURL = [NSURL URLWithString:
- [NSString stringWithFormat:@"asset://styles/%@-v%lu.json",
+ [NSString stringWithFormat:@"mapbox://styles/mapbox/%@-v%lu",
MBXAvailableStyles[self.styleIndex].name,
(unsigned long)kStyleVersion]];
diff --git a/ios/app/mapboxgl-app.gypi b/ios/app/mapboxgl-app.gypi
index 8407ea7da2..b07bfc27ea 100644
--- a/ios/app/mapboxgl-app.gypi
+++ b/ios/app/mapboxgl-app.gypi
@@ -18,7 +18,6 @@
],
'dependencies': [
- '../mbgl.gyp:bundle_styles',
'../mbgl.gyp:core',
'../mbgl.gyp:platform-<(platform_lib)',
'../mbgl.gyp:http-<(http_lib)',
diff --git a/ios/benchmark/MBXBenchViewController.mm b/ios/benchmark/MBXBenchViewController.mm
index 964a5c3de4..2af2cacd1f 100644
--- a/ios/benchmark/MBXBenchViewController.mm
+++ b/ios/benchmark/MBXBenchViewController.mm
@@ -44,7 +44,7 @@
{
[super viewDidLoad];
- NSURL* url = [[NSURL alloc] initWithString:@"asset://styles/streets-v8.json"];
+ NSURL* url = [[NSURL alloc] initWithString:@"mapbox://styles/mapbox/streets-v8.json"];
self.mapView = [[MGLMapView alloc] initWithFrame:self.view.bounds styleURL:url];
self.mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.mapView.delegate = self;
diff --git a/ios/benchmark/benchmark-ios.gypi b/ios/benchmark/benchmark-ios.gypi
index 0a3440d5cd..01f4e8afb2 100644
--- a/ios/benchmark/benchmark-ios.gypi
+++ b/ios/benchmark/benchmark-ios.gypi
@@ -12,7 +12,6 @@
'<!@(find ../ios/benchmark/img -type f)',
'assets/glyphs',
'assets/sprites',
- 'assets/styles',
'assets/tiles',
],
diff --git a/linux/mapboxgl-app.gypi b/linux/mapboxgl-app.gypi
index 20218171d0..8299dc1e76 100644
--- a/linux/mapboxgl-app.gypi
+++ b/linux/mapboxgl-app.gypi
@@ -13,7 +13,6 @@
'../mbgl.gyp:http-<(http_lib)',
'../mbgl.gyp:asset-<(asset_lib)',
'../mbgl.gyp:cache-<(cache_lib)',
- '../mbgl.gyp:copy_styles',
'../mbgl.gyp:copy_certificate_bundle',
],
diff --git a/macosx/mapboxgl-app.gypi b/macosx/mapboxgl-app.gypi
index a8925c3d66..3f16e8e89d 100644
--- a/macosx/mapboxgl-app.gypi
+++ b/macosx/mapboxgl-app.gypi
@@ -13,7 +13,6 @@
],
'dependencies': [
- '../mbgl.gyp:bundle_styles',
'../mbgl.gyp:core',
'../mbgl.gyp:platform-<(platform_lib)',
'../mbgl.gyp:http-<(http_lib)',
diff --git a/platform/android/mapboxgl-app.gypi b/platform/android/mapboxgl-app.gypi
index 82ed377d31..9ab743b5ed 100644
--- a/platform/android/mapboxgl-app.gypi
+++ b/platform/android/mapboxgl-app.gypi
@@ -76,7 +76,6 @@
{
'files': [
'../../common/ca-bundle.crt',
- '../../styles/styles'
],
'destination': '<(pwd)/../android/MapboxGLAndroidSDK/src/main/assets'
},
diff --git a/platform/default/default_styles.cpp b/platform/default/default_styles.cpp
index 5acc735a7d..d25b17817b 100644
--- a/platform/default/default_styles.cpp
+++ b/platform/default/default_styles.cpp
@@ -4,12 +4,12 @@ namespace mbgl {
namespace util {
const std::vector<std::pair<std::string, std::string>> defaultStyles = {
- { "asset://styles/streets-v8.json", "Mapbox Streets" },
- { "asset://styles/emerald-v8.json", "Emerald" },
- { "asset://styles/light-v8.json", "Light" },
- { "asset://styles/dark-v8.json", "Dark" },
- { "asset://styles/satellite-v8.json", "Satellite" },
- { "asset://styles/satellite-hybrid-v8.json", "Satellite Streets" }
+ { "mapbox://styles/mapbox/streets-v8", "Mapbox Streets" },
+ { "mapbox://styles/mapbox/emerald-v8", "Emerald" },
+ { "mapbox://styles/mapbox/light-v8", "Light" },
+ { "mapbox://styles/mapbox/dark-v8", "Dark" },
+ { "mapbox://styles/mapbox/satellite-v8", "Satellite" },
+ { "mapbox://styles/mapbox/satellite-hyrid-v8", "Satellite Streets" },
};
} // end namespace util
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm
index 7d6001132a..4a72da6b1b 100644
--- a/platform/ios/MGLMapView.mm
+++ b/platform/ios/MGLMapView.mm
@@ -62,7 +62,7 @@ NSString *const MGLAnnotationSpritePrefix = @"com.mapbox.sprites.";
static NSURL *MGLURLForBundledStyleNamed(NSString *styleName)
{
- return [NSURL URLWithString:[NSString stringWithFormat:@"asset://styles/%@.json", styleName]];
+ return [NSURL URLWithString:[NSString stringWithFormat:@"mapbox://styles/mapbox/%@", styleName]];
}
mbgl::util::UnitBezier MGLUnitBezierForMediaTimingFunction(CAMediaTimingFunction *function)
@@ -207,7 +207,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
- (void)commonInit
{
_isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent;
-
+
BOOL background = [UIApplication sharedApplication].applicationState == UIApplicationStateBackground;
if (!background)
{
@@ -284,7 +284,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
_attributionButton.translatesAutoresizingMaskIntoConstraints = NO;
[self addSubview:_attributionButton];
_attributionButtonConstraints = [NSMutableArray array];
-
+
_attributionSheet = [[UIActionSheet alloc] initWithTitle:@"Mapbox iOS SDK"
delegate:self
cancelButtonTitle:@"Cancel"
@@ -344,7 +344,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
[twoFingerTap requireGestureRecognizerToFail:_pinch];
[twoFingerTap requireGestureRecognizerToFail:_rotate];
[self addGestureRecognizer:twoFingerTap];
-
+
_twoFingerDrag = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleTwoFingerDragGesture:)];
_twoFingerDrag.minimumNumberOfTouches = 2;
_twoFingerDrag.maximumNumberOfTouches = 2;
@@ -401,7 +401,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
- (void)createGLView
{
if (_context) return;
-
+
// create context
//
_context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
@@ -476,7 +476,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
{
[EAGLContext setCurrentContext:nil];
}
-
+
[self.logoViewConstraints removeAllObjects];
self.logoViewConstraints = nil;
[self.attributionButtonConstraints removeAllObjects];
@@ -488,7 +488,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
if (_delegate == delegate) return;
_delegate = delegate;
-
+
if ([delegate respondsToSelector:@selector(mapView:symbolNameForAnnotation:)])
{
[NSException raise:@"Method unavailable" format:
@@ -743,7 +743,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
{
_mbglMap->update(mbgl::Update::Dimensions);
}
-
+
if (self.attributionSheet.visible)
{
[self.attributionSheet dismissWithClickedButtonIndex:self.attributionSheet.cancelButtonIndex animated:YES];
@@ -812,7 +812,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
if (self.isDormant && [UIApplication sharedApplication].applicationState != UIApplicationStateBackground)
{
self.dormant = NO;
-
+
[self createGLView];
[MGLMapboxEvents validate];
@@ -966,7 +966,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
if (log2(newScale) < _mbglMap->getMinZoom()) return;
_mbglMap->setScale(newScale, [pinch locationInView:pinch.view].x, [pinch locationInView:pinch.view].y);
-
+
[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (pinch.state == UIGestureRecognizerStateEnded || pinch.state == UIGestureRecognizerStateCancelled)
@@ -1060,7 +1060,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
_mbglMap->setBearing(newDegrees,
[rotate locationInView:rotate.view].x,
self.bounds.size.height - [rotate locationInView:rotate.view].y);
-
+
[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (rotate.state == UIGestureRecognizerStateEnded || rotate.state == UIGestureRecognizerStateCancelled)
@@ -1181,7 +1181,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
if (disabledAnnotationIDs.size())
{
// Clear out any nearby annotations that are in our set of
- // disabled annotations.
+ // disabled annotations.
mbgl::util::erase_if(nearbyAnnotations, [&](const uint32_t annotationID) {
return disabledAnnotationIDs.count(annotationID) != 0;
});
@@ -1375,7 +1375,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
if (newZoom < _mbglMap->getMinZoom()) return;
_mbglMap->scaleBy(powf(2, newZoom) / _mbglMap->getScale(), self.bounds.size.width / 2, self.bounds.size.height / 2);
-
+
[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (quickZoom.state == UIGestureRecognizerStateEnded || quickZoom.state == UIGestureRecognizerStateCancelled)
@@ -1389,9 +1389,9 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
- (void)handleTwoFingerDragGesture:(UIPanGestureRecognizer *)twoFingerDrag
{
if ( ! self.isPitchEnabled) return;
-
+
_mbglMap->cancelTransitions();
-
+
if (twoFingerDrag.state == UIGestureRecognizerStateBegan)
{
[self trackGestureEvent:MGLEventGesturePitchStart forRecognizer:twoFingerDrag];
@@ -1403,9 +1403,9 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
CGFloat slowdown = 20.0;
CGFloat pitchNew = mbgl::util::clamp(currentPitch - (gestureDistance / slowdown), MGLMinimumPitch, MGLMaximumPitch);
-
+
_mbglMap->setPitch(pitchNew);
-
+
[self notifyMapChange:mbgl::MapChangeRegionIsChanging];
}
else if (twoFingerDrag.state == UIGestureRecognizerStateEnded || twoFingerDrag.state == UIGestureRecognizerStateCancelled)
@@ -1414,7 +1414,7 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration)
[self notifyMapChange:mbgl::MapChangeRegionDidChange];
}
-
+
}
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
@@ -1749,9 +1749,9 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
}
_mbglMap->easeTo(options);
[self didChangeValueForKey:@"visibleCoordinateBounds"];
-
+
[self unrotateIfNeededAnimated:duration > 0];
-
+
[self notifyMapChange:(duration > 0 ? mbgl::MapChangeRegionDidChangeAnimated : mbgl::MapChangeRegionDidChange)];
}
@@ -1811,7 +1811,7 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
}
CLLocationCoordinate2D edgeCoordinate = [self convertPoint:edgePoint toCoordinateFromView:self];
mbgl::ProjectedMeters edgeMeters = _mbglMap->projectedMetersForLatLng(MGLLatLngFromLocationCoordinate2D(edgeCoordinate));
-
+
// Because we constrain the zoom level vertically in portrait orientation,
// the visible medial span is affected by pitch: the distance from the
// center point to the near edge is less than than distance from the center
@@ -1827,7 +1827,7 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
CLLocationCoordinate2D nearEdgeCoordinate = [self convertPoint:nearEdgePoint toCoordinateFromView:self];
nearEdgeMeters = _mbglMap->projectedMetersForLatLng(MGLLatLngFromLocationCoordinate2D(nearEdgeCoordinate));
}
-
+
// The opposite side is the distance between the center and one edge.
CLLocationCoordinate2D centerCoordinate = self.centerCoordinate;
mbgl::ProjectedMeters centerMeters = _mbglMap->projectedMetersForLatLng(MGLLatLngFromLocationCoordinate2D(centerCoordinate));
@@ -1836,9 +1836,9 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
CLLocationDistance centerToNearEdge = std::hypot(centerMeters.easting - nearEdgeMeters.easting,
centerMeters.northing - nearEdgeMeters.northing);
CLLocationDistance altitude = (centerToEdge + centerToNearEdge) / 2 / std::tan(MGLAngularFieldOfView / 2.);
-
+
CGFloat pitch = _mbglMap->getPitch();
-
+
return [MGLMapCamera cameraLookingAtCenterCoordinate:centerCoordinate
fromDistance:altitude
pitch:pitch
@@ -1861,7 +1861,7 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
mbgl::LatLng centerLatLng = MGLLatLngFromLocationCoordinate2D(camera.centerCoordinate);
mbgl::ProjectedMeters centerMeters = _mbglMap->projectedMetersForLatLng(centerLatLng);
CLLocationDistance centerToEdge = camera.altitude * std::tan(MGLAngularFieldOfView / 2.);
-
+
double angle = -1;
if (camera.heading >= 0)
{
@@ -1872,7 +1872,7 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
{
pitch = MGLRadiansFromDegrees(mbgl::util::clamp(camera.pitch, MGLMinimumPitch, MGLMaximumPitch));
}
-
+
// Make a visible bounds that extends in the constrained direction (the
// shorter of the two axes).
CGRect frame = self.frame;
@@ -1899,12 +1899,12 @@ mbgl::LatLngBounds MGLLatLngBoundsFromCoordinateBounds(MGLCoordinateBounds coord
centerMeters.easting + centerToEdge * std::sin(-angle) - centerToEdge * std::sin(-angle) * std::sin(pitch) / 2,
});
}
-
+
// Fit the viewport to the bounds. Correct the center in case pitch should
// cause the visual center to lie above the screen center.
mbgl::CameraOptions options = _mbglMap->cameraForLatLngs({ sw, ne }, {});
options.center = centerLatLng;
-
+
if (camera.heading >= 0)
{
options.angle = angle;
@@ -2201,7 +2201,7 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
{
// store image & symbol name
[self.annotationImages setObject:annotationImage forKey:annotationImage.reuseIdentifier];
-
+
[self installAnnotationImage:annotationImage];
}
@@ -2252,14 +2252,14 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
CGContextDrawImage(context, CGRectMake(0, 0, width, height), image);
CGContextRelease(context);
CGColorSpaceRelease(colorSpace);
-
+
// add sprite
auto cSpriteImage = std::make_shared<mbgl::SpriteImage>(
uint16_t(annotationImage.image.size.width),
uint16_t(annotationImage.image.size.height),
float(annotationImage.image.scale),
std::move(pixels));
-
+
// sprite upload
NSString *symbolName = [MGLAnnotationSpritePrefix stringByAppendingString:annotationImage.reuseIdentifier];
_mbglMap->setSprite(symbolName.UTF8String, cSpriteImage);
@@ -2428,10 +2428,10 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
[self.selectedAnnotationCalloutView.rightAccessoryView addGestureRecognizer:calloutAccessoryTap];
}
}
-
+
// set annotation delegate to handle taps on the callout view
self.selectedAnnotationCalloutView.delegate = self;
-
+
// present popup
[self.selectedAnnotationCalloutView presentCalloutFromRect:calloutBounds
inView:self.glView
@@ -2681,7 +2681,7 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
{
CLLocation *oldLocation = self.userLocation.location;
CLLocation *newLocation = locations.lastObject;
-
+
if ( ! _showsUserLocation || ! newLocation || ! CLLocationCoordinate2DIsValid(newLocation.coordinate)) return;
if (! oldLocation || ! CLLocationCoordinate2DIsValid(oldLocation.coordinate) || [newLocation distanceFromLocation:oldLocation])
@@ -2696,7 +2696,7 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
[self.delegate mapView:self didUpdateUserLocation:self.userLocation];
}
}
-
+
CLLocationDirection course = self.userLocation.location.course;
if (course < 0 || self.userTrackingMode != MGLUserTrackingModeFollowWithCourse)
{
@@ -2751,7 +2751,7 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
}
}
}
-
+
self.userLocationAnnotationView.haloLayer.hidden = ! CLLocationCoordinate2DIsValid(self.userLocation.coordinate) ||
newLocation.horizontalAccuracy > 10;
diff --git a/scripts/android/run.sh b/scripts/android/run.sh
index 00a12d025f..9381edfeed 100755
--- a/scripts/android/run.sh
+++ b/scripts/android/run.sh
@@ -12,9 +12,6 @@ export MASON_ANDROID_ABI=${ANDROID_ABI}
# Build
################################################################################
-mapbox_time "checkout_styles" \
-git submodule update --init styles
-
mkdir -p ./android/MapboxGLAndroidSDKTestApp/src/main/res/raw
echo "${MAPBOX_ACCESS_TOKEN}" > ./android/MapboxGLAndroidSDKTestApp/src/main/res/raw/token.txt
diff --git a/scripts/ios/package.sh b/scripts/ios/package.sh
index bb0aaaefdb..4d219338be 100755
--- a/scripts/ios/package.sh
+++ b/scripts/ios/package.sh
@@ -104,8 +104,6 @@ step "Copying Resources..."
cp -pv LICENSE.md "${OUTPUT}/static"
mkdir -p "${OUTPUT}/static/${NAME}.bundle"
cp -pv platform/ios/resources/* "${OUTPUT}/static/${NAME}.bundle"
-mkdir -p "${OUTPUT}/static/${NAME}.bundle/styles"
-cp -pv styles/styles/{dark,emerald,light,streets,satellite,satellite-hybrid}-v8.json "${OUTPUT}/static/${NAME}.bundle/styles"
step "Creating API Docs..."
if [ -z `which appledoc` ]; then
diff --git a/scripts/linux/run.sh b/scripts/linux/run.sh
index 31272ea1c2..142cbcb680 100755
--- a/scripts/linux/run.sh
+++ b/scripts/linux/run.sh
@@ -11,9 +11,6 @@ BUILDTYPE=${BUILDTYPE:-Release}
# Build
################################################################################
-mapbox_time "checkout_styles" \
-git submodule update --init styles
-
mapbox_time "compile_program" \
make linux -j${JOBS} BUILDTYPE=${BUILDTYPE}
diff --git a/scripts/main.mk b/scripts/main.mk
index deba6db9d4..75e574d26d 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -38,10 +38,6 @@ SUBMODULES += .mason/mason.sh
.mason/mason.sh:
./scripts/flock.py .git/Submodule.lock git submodule update --init .mason
-SUBMODULES += styles/styles
-styles/styles:
- ./scripts/flock.py .git/Submodule.lock git submodule update --init styles
-
SUBMODULES += src/mbgl/util/geojsonvt/geojsonvt.hpp
src/mbgl/util/geojsonvt/geojsonvt.hpp:
./scripts/flock.py .git/Submodule.lock git submodule update --init src/mbgl/util/geojsonvt
diff --git a/scripts/node/run.sh b/scripts/node/run.sh
index 22db3fdedd..983916c90c 100755
--- a/scripts/node/run.sh
+++ b/scripts/node/run.sh
@@ -14,9 +14,6 @@ BUILDTYPE=${BUILDTYPE:-Release}
source ~/.nvm/nvm.sh
nvm use $NODE_VERSION
-mapbox_time "checkout_styles" \
-git submodule update --init styles
-
mapbox_time "compile_program" \
npm install --build-from-source
diff --git a/scripts/osx/run.sh b/scripts/osx/run.sh
index 86a7291522..1020879471 100755
--- a/scripts/osx/run.sh
+++ b/scripts/osx/run.sh
@@ -11,9 +11,6 @@ BUILDTYPE=${BUILDTYPE:-Release}
# Build
################################################################################
-mapbox_time "checkout_styles" \
-git submodule update --init styles
-
mapbox_time "checkout_geojsonvt" \
git submodule update --init src/mbgl/util/geojsonvt
diff --git a/styles b/styles
deleted file mode 160000
-Subproject decac15acd41a1c899de7c3306c88ec2feb8e58