Skip to content

Commit

Permalink
migrate ios sdk from maplibre to vietmap
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhdang198 committed Jan 30, 2024
1 parent 7544597 commit 7dc8324
Show file tree
Hide file tree
Showing 43 changed files with 89 additions and 85 deletions.
10 changes: 10 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Copyright (c) 2024 VietMap contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This project was originally forked from https://github.com/rnmapbox/maps, also under the MIT license, but without a copyright holder notice.
//------------------------------------------------------------------------------------------------------------------------------
Copyright (c) 2022 MapLibre contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Expand Down
13 changes: 2 additions & 11 deletions example/ios/RNMaplibreExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
51C0260825301F99008C5283 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51C0260725301F99008C5283 /* LaunchScreen.storyboard */; };
AD8CDE4F410D2E699BE7E99D /* libPods-RNMaplibreExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A98F897FA1ECD18EB0F1C4DC /* libPods-RNMaplibreExample.a */; };
E9DD059E29705D4C0010A116 /* Mapbox in Frameworks */ = {isa = PBXBuildFile; productRef = 80AC8CF095DA4835C83255C8 /* Mapbox */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -63,7 +62,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E9DD059E29705D4C0010A116 /* Mapbox in Frameworks */,
AD8CDE4F410D2E699BE7E99D /* libPods-RNMaplibreExample.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -206,7 +204,6 @@
);
name = RNMaplibreExample;
packageProductDependencies = (
80AC8CF095DA4835C83255C8 /* Mapbox */,
);
productName = RNMaplibreExample;
productReference = 13B07F961A680F5B00A75B9A /* RNMaplibreExample.app */;
Expand Down Expand Up @@ -358,12 +355,14 @@
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/VietMap/VietMap.framework/VietMap",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/VietMap.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -620,14 +619,6 @@
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
80AC8CF095DA4835C83255C8 /* Mapbox */ = {
isa = XCSwiftPackageProductDependency;
package = DB11E3B9346BB8DFEB4101D5 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */;
productName = Mapbox;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
}
2 changes: 1 addition & 1 deletion ios/RCTMGL/CameraStop.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2017 Mapbox Inc. All rights reserved.
//

@import Mapbox;
@import VietMap;
#import "RCTMGLCamera.h"

@interface CameraStop : NSObject
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/FilterParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "FilterParser.h"
#import <Mapbox/Mapbox.h>
#import <VietMap/VietMap.h>

@implementation FilterParser

Expand Down
4 changes: 2 additions & 2 deletions ios/RCTMGL/MGLCustomHeaders.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#import <objc/runtime.h>

#import "MGLCustomHeaders.h"
#import <Mapbox/Mapbox.h>
#import <Mapbox/MGLNetworkConfiguration.h>
#import <VietMap/VietMap.h>
#import <VietMap/MGLNetworkConfiguration.h>

@implementation NSMutableURLRequest (CustomHeaders)

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLFaux3DUserLocationAnnotationView.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <UIKit/UIKit.h>
@import Mapbox;
@import VietMap;

extern const CGFloat MGLUserLocationAnnotationDotSize;
extern const CGFloat MGLUserLocationAnnotationHaloSize;
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#import "CameraMode.h"
#import "RCTMGLSource.h"
#import "MGLCustomHeaders.h"
@import Mapbox;
@import VietMap;

@implementation MGLModule

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLOfflineModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>

@import Mapbox;
@import VietMap;

@interface MGLOfflineModule : RCTEventEmitter<RCTBridgeModule>

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLSnapshotModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "MGLSnapshotModule.h"
#import "RCTMGLUtils.h"
#import "RNMBImageUtils.h"
@import Mapbox;
@import VietMap;

@implementation MGLSnapshotModule

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLUserLocationHeadingArrowLayer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <QuartzCore/QuartzCore.h>
#import "MGLUserLocationHeadingIndicator.h"
@import Mapbox;
@import VietMap;

@interface MGLUserLocationHeadingArrowLayer : CAShapeLayer <MGLUserLocationHeadingIndicator>

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLUserLocationHeadingBeamLayer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <QuartzCore/QuartzCore.h>
#import "MGLUserLocationHeadingIndicator.h"
@import Mapbox;
@import VietMap;

@interface MGLUserLocationHeadingBeamLayer : CALayer <MGLUserLocationHeadingIndicator>

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/MGLUserLocationHeadingIndicator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#import <QuartzCore/QuartzCore.h>
@import Mapbox;
@import VietMap;

@protocol MGLUserLocationHeadingIndicator <NSObject>

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLBackgroundLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLLayer.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLBackgroundLayer : RCTMGLLayer

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLCallout.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <React/RCTView.h>

@import Mapbox;
@import VietMap;

@interface RCTMGLCallout : RCTView<MGLCalloutView>

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLFillExtrusionLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLVectorLayer.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLFillExtrusionLayer : RCTMGLVectorLayer

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLFillLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLVectorLayer.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLFillLayer : RCTMGLVectorLayer

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLImageSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLImageSource.h"
@import Mapbox;
@import VietMap;

@implementation RCTMGLImageSource

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLImages.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import <React/RCTComponent.h>
#import <UIKit/UIKit.h>

@import Mapbox;
@import VietMap;

@class RCTMGLMapView;

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

@class RCTMGLMapView;

@import Mapbox;
@import VietMap;

@interface RCTMGLLayer<T> : UIView

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <UIKit/UIKit.h>
@import Mapbox;
@import VietMap;

@interface RCTMGLLight : UIView

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLLineLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLVectorLayer.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLLineLayer : RCTMGLVectorLayer

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLLogging.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import "RCTMGLLogging.h"

@import Mapbox;
@import VietMap;

@interface RCTMGLLogging()
@property (nonatomic) BOOL hasListeners;
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLMapTouchEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <Foundation/Foundation.h>
#import "RCTMGLEvent.h"
#import "RCTMGLPointAnnotation.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLMapTouchEvent : RCTMGLEvent

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLMapTouchEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "RCTMGLMapTouchEvent.h"
#import "RCTMGLEventTypes.h"
#import "RCTMGLPointAnnotation.h"
@import Mapbox;
@import VietMap;

@implementation RCTMGLMapTouchEvent

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#import "RCTMGLPointAnnotation.h"
#import "RCTMGLLight.h"

@import Mapbox;
@import VietMap;

@class CameraUpdateQueue;
@class RCTMGLImages;
Expand Down
3 changes: 2 additions & 1 deletion ios/RCTMGL/RCTMGLMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ - (void)setReactRotateEnabled:(BOOL)reactRotateEnabled
- (void)setReactAttributionEnabled:(BOOL)reactAttributionEnabled
{
_reactAttributionEnabled = reactAttributionEnabled;
self.attributionButton.hidden = !_reactAttributionEnabled;
// self.attributionButton.hidden = !_reactAttributionEnabled;


}

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLMapViewManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "ViewManager.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLMapViewManager : ViewManager

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLPointAnnotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import <React/RCTView.h>
#import "RCTMGLCallout.h"

@import Mapbox;
@import VietMap;

@interface RCTMGLPointAnnotation : MGLAnnotationView<MGLAnnotation>

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLRasterLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLLayer.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLRasterLayer : RCTMGLLayer

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLRasterSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "RCTMGLTileSource.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLRasterSource : RCTMGLTileSource

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLShapeSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <React/RCTBridge.h>
#import "RCTMGLSource.h"

@import Mapbox;
@import VietMap;

@interface RCTMGLShapeSource : RCTMGLSource

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <React/RCTComponent.h>
#import "RCTMGLLayer.h"
#import <UIKit/UIKit.h>
@import Mapbox;
@import VietMap;

@interface RCTMGLSource : UIView

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#import "RCTMGLStyleValue.h"
#import <React/RCTBridge.h>

@import Mapbox;
@import VietMap;

@interface RCTMGLStyle : NSObject

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLStyleValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import <Foundation/Foundation.h>
@import Mapbox;
@import VietMap;

@interface RCTMGLStyleValue : NSObject

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLTileSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//

#import "RCTMGLSource.h"
@import Mapbox;
@import VietMap;

@interface RCTMGLTileSource : RCTMGLSource

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLUserLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <Mapbox/MGLUserLocationAnnotationView.h>
#import <VietMap/MGLUserLocationAnnotationView.h>

@interface RCTMGLUserLocation : NSObject

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLUserLocation.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//

#import "RCTMGLUserLocation.h"
#import <Mapbox/MGLUserLocationAnnotationView.h>
#import <VietMap/MGLUserLocationAnnotationView.h>

@interface HiddenUserLocationAnnotationView : MGLUserLocationAnnotationView

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import <React/RCTConvert.h>
#import <React/RCTImageLoader.h>

@import Mapbox;
@import VietMap;

@interface RCTMGLUtils: NSObject

Expand Down
2 changes: 1 addition & 1 deletion ios/RCTMGL/RCTMGLUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "RCTMGLUtils.h"
#import "RCTMGLImageQueue.h"

@import Mapbox;
@import VietMap;

@implementation RCTMGLUtils

Expand Down
Loading

0 comments on commit 7dc8324

Please sign in to comment.