Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ buildscript {
}

android {
compileSdkVersion rootProject.ext.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 28
buildToolsVersion rootProject.ext.hasProperty('buildToolsVersion') ? rootProject.ext.buildToolsVersion : "28.0.3"
compileSdkVersion rootProject.ext.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
buildToolsVersion rootProject.ext.hasProperty('buildToolsVersion') ? rootProject.ext.buildToolsVersion : "33.0.0"

defaultConfig {
minSdkVersion rootProject.ext.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 16
targetSdkVersion rootProject.ext.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 28
targetSdkVersion rootProject.ext.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33

versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_9
targetCompatibility JavaVersion.VERSION_1_9
}
buildTypes {
release {
Expand Down Expand Up @@ -54,6 +54,6 @@ repositories {

dependencies {
implementation 'com.facebook.react:react-native:+'
implementation "com.naver.maps:map-sdk:${rootProject.ext.hasProperty('mapSdkVersion') ? rootProject.ext.mapSdkVersion : '3.12.0'}"
implementation "com.naver.maps:map-sdk:${rootProject.ext.hasProperty('mapSdkVersion') ? rootProject.ext.mapSdkVersion : '3.16.0'}"
implementation "com.google.android.gms:play-services-location:16.0.0"
}
2 changes: 1 addition & 1 deletion example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- NMapsMap (3.12.0)
- NMapsMap (3.17.0)
- RCTRequired (0.61.2)
- RCTTypeSafety (0.61.2):
- FBLazyVector (= 0.61.2)
Expand Down
4 changes: 2 additions & 2 deletions example/ios/example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = com.github.quadflask.rnnmap;
PRODUCT_BUNDLE_IDENTIFIER = com.github.zerocho.rnnmap;
PRODUCT_NAME = example;
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down Expand Up @@ -794,7 +794,7 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = com.github.quadflask.rnnmap;
PRODUCT_BUNDLE_IDENTIFIER = com.github.zerocho.rnnmap;
PRODUCT_NAME = example;
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down
29 changes: 26 additions & 3 deletions index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
import React, {Component, SyntheticEvent} from 'react';
import {findNodeHandle, Image, ImageSourcePropType, NativeModules, Platform, processColor, requireNativeComponent, StyleProp, UIManager, ViewStyle,} from 'react-native';
import {
findNodeHandle,
Image,
ImageSourcePropType,
NativeModules,
Platform,
processColor,
ProcessedColorValue,
requireNativeComponent,
StyleProp,
UIManager,
ViewStyle,
} from 'react-native';

const RNNaverMapView = requireNativeComponent('RNNaverMapView');
const RNNaverMapViewTexture = Platform.select({
Expand Down Expand Up @@ -119,10 +131,11 @@ export interface NaverMapViewProps {
stopGesturesEnabled?: boolean;
liteModeEnabled?: boolean;
useTextureView?: boolean;
children?: Element;
children?: React.Element;
}

export default class NaverMapView extends Component<NaverMapViewProps, {}> {
props: NaverMapViewProps;
ref?: RNNaverMapView;
nodeHandle?: null | number;

Expand Down Expand Up @@ -268,6 +281,8 @@ export interface MarkerProps extends MapOverlay {
}

export class Marker extends Component<MarkerProps> {
props: MarkerProps;

render() {
return <RNNaverMapMarker
{...this.props}
Expand Down Expand Up @@ -296,6 +311,8 @@ export interface CircleProps extends MapOverlay {
}

export class Circle extends Component<CircleProps> {
props: CircleProps;

render() {
return <RNNaverMapCircleOverlay {...this.props} />;
}
Expand All @@ -308,6 +325,8 @@ interface PolylineProps extends Omit<MapOverlay, "coordinate"> {
}

export class Polyline extends Component<PolylineProps> {
props: PolylineProps;

render() {
return <RNNaverMapPolylineOverlay {...this.props} />;
}
Expand All @@ -322,6 +341,8 @@ interface PolygonProps extends Omit<MapOverlay, "coordinate"> {
}

export class Polygon extends Component<PolygonProps> {
props: PolygonProps;

render() {
return Platform.select({
android: () => <RNNaverMapPolygonOverlay {...this.props} />,
Expand Down Expand Up @@ -351,6 +372,8 @@ export interface PathProps extends Omit<MapOverlay, "coordinate"> {
}

export class Path extends Component<PathProps> {
props: PathProps;

render() {
return <RNNaverMapPathOverlay
{...this.props}
Expand All @@ -368,7 +391,7 @@ function getImageUri(src?: ImageSourcePropType): string | null {
return imageUri;
}

function parseColor(color?: string | null): string | null | undefined | number {
function parseColor(color?: string | null): string | ProcessedColorValue {
if (color && Platform.OS === 'ios')
return processColor(color);
return color;
Expand Down
2 changes: 0 additions & 2 deletions ios/reactNativeNMap/RCTConvert+NMFMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
//

#import <NMapsMap/NMFCameraUpdate.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFCameraPosition.h>
#import <NMapsMap/NMGLatLngBounds.h>
#import <NMapsMap/NMFOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapCircleOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <React/RCTBridge.h>
#import <React/RCTComponent.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFCircleOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
3 changes: 1 addition & 2 deletions ios/reactNativeNMap/RNNaverMapCircleOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import <React/RCTBridge.h>
#import <React/RCTUtils.h>
#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFCircleOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand All @@ -36,7 +35,7 @@ - (void)setCoordinate:(NMGLatLng*) coordinate {
_realOverlay.zIndex = _oldOverlay.zIndex;
_realOverlay.mapView = _oldOverlay.mapView;
_oldOverlay.mapView = nil;

__block RNNaverMapCircleOverlay *this = self;
_realOverlay.touchHandler = ^BOOL(NMFOverlay *overlay) {
if (this.onClick != nil) {
Expand Down
2 changes: 0 additions & 2 deletions ios/reactNativeNMap/RNNaverMapCircleOverlayManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import "RNNaverMapCircleOverlayManager.h"
#import "RNNaverMapCircleOverlay.h"
#import <React/RCTUIManager.h>
#import <NMapsMap/NMGLatLng.h>

#import "RCTConvert+NMFMapView.h"

Expand All @@ -29,6 +28,5 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(outlineWidth, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(outlineColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(zIndex, NSInteger)
RCT_EXPORT_VIEW_PROPERTY(onClick, RCTDirectEventBlock)

@end
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapMarker.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <React/RCTBridge.h>
#import <React/RCTComponent.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFMarker.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapMarker.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#import <React/RCTImageLoader.h>
#import <React/RCTUtils.h>
#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFMarker.h>
#import <NMapsMap/NMFOverlayImage.h>

Expand Down
4 changes: 1 addition & 3 deletions ios/reactNativeNMap/RNNaverMapMarkerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import "RNNaverMapMarkerManager.h"
#import "RNNaverMapMarker.h"
#import <React/RCTUIManager.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFCameraCommon.h>

#import "RCTConvert+NMFMapView.h"
Expand Down Expand Up @@ -60,7 +59,7 @@ - (UIView *)view
CGFloat requestedWidth = [RCTConvert CGFloat:dic[@"requestedWidth"]];
double minZoom = dic[@"minZoom"] ? [RCTConvert double:dic[@"minZoom"]] : NMF_MIN_ZOOM;
double maxZoom = dic[@"maxZoom"] ? [RCTConvert double:dic[@"maxZoom"]] : NMF_MAX_ZOOM;

[view setSubCaptionText: text];
[view setSubCaptionTextSize:textSize];
[view setSubCaptionColor:color];
Expand Down Expand Up @@ -89,6 +88,5 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(pinColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(alpha, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(anchor, CGPoint)
RCT_EXPORT_VIEW_PROPERTY(onClick, RCTDirectEventBlock)

@end
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapPathOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <React/RCTBridge.h>
#import <React/RCTComponent.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFPath.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapPathOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import <React/RCTImageLoader.h>
#import <React/RCTUtils.h>
#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFPath.h>
#import <NMapsMap/NMFOverlayImage.h>

Expand Down
2 changes: 0 additions & 2 deletions ios/reactNativeNMap/RNNaverMapPathOverlayManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import "RNNaverMapPathOverlayManager.h"
#import "RNNaverMapPathOverlay.h"
#import <React/RCTUIManager.h>
#import <NMapsMap/NMGLatLng.h>

#import "RCTConvert+NMFMapView.h"

Expand Down Expand Up @@ -40,6 +39,5 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(passedOutlineColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(pattern, NSString)
RCT_EXPORT_VIEW_PROPERTY(patternInterval, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(onClick, RCTDirectEventBlock)

@end
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapPolygonOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#import <React/RCTBridge.h>
#import <React/RCTComponent.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFPolygonOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapPolygonOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#import <React/RCTImageLoader.h>
#import <React/RCTUtils.h>
#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFPolygonOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
2 changes: 0 additions & 2 deletions ios/reactNativeNMap/RNNaverMapPolygonOverlayManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "RNNaverMapPolygonOverlayManager.h"
#import "RNNaverMapPolygonOverlay.h"
#import <React/RCTUIManager.h>
#import <NMapsMap/NMGLatLng.h>

#import "RCTConvert+NMFMapView.h"

Expand Down Expand Up @@ -53,6 +52,5 @@ - (UIView *)view
RCT_EXPORT_VIEW_PROPERTY(outlineWidth, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(color, UIColor)
RCT_EXPORT_VIEW_PROPERTY(outlineColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(onClick, RCTDirectEventBlock)

@end
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapPolylineOverlay.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <React/RCTBridge.h>
#import <React/RCTComponent.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFPolylineOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapPolylineOverlay.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import <React/RCTImageLoader.h>
#import <React/RCTUtils.h>
#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFPolylineOverlay.h>

#import "RCTConvert+NMFMapView.h"
Expand Down
2 changes: 0 additions & 2 deletions ios/reactNativeNMap/RNNaverMapPolylineOverlayManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import "RNNaverMapPolylineOverlayManager.h"
#import "RNNaverMapPolylineOverlay.h"
#import <React/RCTUIManager.h>
#import <NMapsMap/NMGLatLng.h>

#import "RCTConvert+NMFMapView.h"

Expand All @@ -34,6 +33,5 @@ - (UIView *)view
}
RCT_EXPORT_VIEW_PROPERTY(strokeWidth, CGFloat)
RCT_EXPORT_VIEW_PROPERTY(strokeColor, UIColor)
RCT_EXPORT_VIEW_PROPERTY(onClick, RCTDirectEventBlock)

@end
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import <React/RCTBridge.h>

#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFMarker.h>
#import <NMapsMap/NMFCameraUpdate.h>
#import <NMapsMap/NMFMapViewDelegate.h>
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapView.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#import <React/RCTBridge.h>
#import <React/UIView+React.h>

#import <NMapsMap/NMGLatLng.h>
#import <NMapsMap/NMFMarker.h>
#import <NMapsMap/NMFCameraUpdate.h>
#import <NMapsMap/NMFCameraPosition.h>
Expand Down
1 change: 0 additions & 1 deletion ios/reactNativeNMap/RNNaverMapViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#import <NMapsMap/NMFNaverMapView.h>
#import <NMapsMap/NMFCameraUpdate.h>
#import <NMapsMap/NMFCameraPosition.h>
#import <NMapsMap/NMGLatLng.h>

#import "RCTConvert+NMFMapView.h"
#import "RNNaverMapView.h"
Expand Down
Loading