Skip to content

1.0.0 Dev Preview 10 #70

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Mar 30, 2023
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.0-dev.10
- fix bugs ([#69](https://github.com/note11g/flutter_naver_map/issues/69))
- internal refactoring (code/struct improvement)
- add [docs](https://note11.dev/flutter_naver_map/)

## 1.0.0-dev.9
- fix bugs ([#51](https://github.com/note11g/flutter_naver_map/issues/51), [#53](https://github.com/note11g/flutter_naver_map/issues/53), [#54](https://github.com/note11g/flutter_naver_map/issues/54), [#55](https://github.com/note11g/flutter_naver_map/issues/55), [#60](https://github.com/note11g/flutter_naver_map/issues/60))
- add `NaverMapViewOptions.copyWith`
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# flutter_naver_map 1.0 Dev Preview

NaverMap SDK for Flutter (1.0-dev.9)
NaverMap SDK for Flutter (1.0-dev.10)

플러터 3.0 이상, dart 2.18.4 이상을 사용하셔야 합니다.
android는 5.1 이상, iOS는 11.0 이상을 지원합니다.

**[개발 문서 바로가기](https://note11.dev/flutter_naver_map)**

(작업 중이므로 불완전한 문서들이 있을 수 있습니다.)

### 필독 (iOS)
1.0.0-dev.3 버전을 사용하셨거나, 이전버전(0.10)을 사용하셨던 분들은,
1.0.0-dev.3 이하 버전을 사용하셨거나, 이전버전(0.10)을 사용하셨던 분들은,
iOS에서 네이버맵 구버전으로 빌드될 수 있습니다.

현재 라이브러리에서 사용하는 버전은 3.16.2로, 다음과 같은 명령어 실행이 필요합니다.
Expand All @@ -25,7 +28,7 @@ Naver Cloud Platform 에서 앱을 등록하고, Android / iOS 플랫폼을 등

```yaml
dependencies:
flutter_naver_map: ^1.0.0-dev.9
flutter_naver_map: ^1.0.0-dev.10
```

### Android
Expand Down Expand Up @@ -116,4 +119,4 @@ Widget build(BuildContext context) {
- [ ] API DOCS 작성 (작성중)
- [ ] 예제 작성
- [ ] 테스트 작성
- [ ] 클러스터링 구현 (추가 패키지로 제공될 예정입니다)
- [ ] 클러스터링 구현 (추가 패키지로 제공될 예정입니다)
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package dev.note11.flutter_naver_map.flutter_naver_map.controller.overlay

import android.content.Context
import android.util.Log
import com.naver.maps.geometry.LatLng
import com.naver.maps.map.overlay.*
import dev.note11.flutter_naver_map.flutter_naver_map.controller.overlay.handler.*
Expand Down Expand Up @@ -33,24 +32,29 @@ import io.flutter.plugin.common.MethodChannel
internal class OverlayController(
private val channel: MethodChannel,
private val context: Context,
) : LocationOverlayHandler, MarkerHandler, InfoWindowHandler, CircleOverlayHandler,
) : OverlaySender, LocationOverlayHandler, MarkerHandler, InfoWindowHandler, CircleOverlayHandler,
GroundOverlayHandler, PolygonOverlayHandler, PolylineOverlayHandler, PathOverlayHandler,
MultipartPathOverlayHandler, ArrowheadPathOverlayHandler {
/* ----- channel ----- */
init {
channel.setMethodCallHandler(::handler)
}

/* ----- sender ----- */
override fun onOverlayTapped(info: NOverlayInfo) {
val query = NOverlayQuery(info, methodName = OverlayHandler.onTapName).query
channel.invokeMethod(query, null)
}

/* ----- overlay storage ----- */

private val overlays: MutableMap<NOverlayInfo, Overlay> = mutableMapOf()

override fun saveOverlay(overlay: Overlay, info: NOverlayInfo) {
info.saveAtOverlay(overlay)
detachOverlay(info)
val query = NOverlayQuery(info, methodName = OverlayHandler.onTapName).query
overlay.setOnClickListener {
channel.invokeMethod(query, null)
onOverlayTapped(info)
return@setOnClickListener true
}
overlays[info] = overlay
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package dev.note11.flutter_naver_map.flutter_naver_map.controller.overlay

import dev.note11.flutter_naver_map.flutter_naver_map.model.map.info.NOverlayInfo

internal interface OverlaySender {
fun onOverlayTapped(info: NOverlayInfo)
}
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ internal class NaverMapView(
mapView.onPause()
}

override fun onActivityStopped(activity: Activity) {
if (activity != this.activity) return

mapView.onStop()
}
override fun onActivityStopped(activity: Activity) = Unit

override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {
if (activity != this.activity) return
Expand Down
8 changes: 8 additions & 0 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,13 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)

target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
## dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
'PERMISSION_LOCATION=1',
]
end
end
end
14 changes: 7 additions & 7 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ PODS:
- flutter_naver_map (1.0.0):
- Flutter
- NMapsMap (= 3.16.2)
- geolocator_apple (1.2.0):
- Flutter
- integration_test (0.0.1):
- Flutter
- NMapsGeometry (1.0.1)
Expand All @@ -13,13 +11,15 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.0.4):
- Flutter

DEPENDENCIES:
- Flutter (from `Flutter`)
- flutter_naver_map (from `.symlinks/plugins/flutter_naver_map/ios`)
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)

SPEC REPOS:
trunk:
Expand All @@ -31,22 +31,22 @@ EXTERNAL SOURCES:
:path: Flutter
flutter_naver_map:
:path: ".symlinks/plugins/flutter_naver_map/ios"
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/ios"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_naver_map: d1ee15e7a2fe5360a19640648ceed5abf79d82aa
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5
NMapsGeometry: 53c573ead66466681cf123f99f698dc8071a4b83
NMapsMap: aaa64717249b06ae82c3a3addb3a01f0e33100ab
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce

PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
PODFILE CHECKSUM: 45d27258f3a62ba7066db214d3af977e6c8dd7b4

COCOAPODS: 1.11.3
16 changes: 6 additions & 10 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>need location permission to show user's currnet location in map</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>need location permission to show user's currnet location in map</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>need location permission to show user's currnet location in map</string>
<key>NSLocationUsageDescription</key>
<string>need location permission to show user's currnet location in map</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>need location permission to show user's currnet location in map</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand All @@ -41,15 +39,13 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
Expand Down
Loading