Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6423b12
iOS - customStyle 대응
fogbar Apr 25, 2025
a4f42d9
Android - customStyle 대응
fogbar Apr 25, 2025
177ae6b
[Chore] new readme test.
note11g May 10, 2025
84c03ea
[Chore] new readme draft
note11g May 10, 2025
56b08c0
[Chore] readme update (add migration notice)
note11g May 10, 2025
f35578e
[Update, iOS] change InfoWindow ui match with android and fix #229
note11g May 11, 2025
ec2a5be
[Update] add support dynamic widget image(automatically detecting wid…
note11g May 11, 2025
36175c2
[Add] add `onMapLoaded` on `NaverMap` widget. and `_NaverMapControlHa…
note11g May 18, 2025
57f1b09
[Impl, iOS] impl `onMapLoaded` on iOS Platform (`NaverMapControlSende…
note11g May 18, 2025
a8512bc
[Impl, Android] impl `onMapLoaded` on Android Platform (`NaverMapCont…
note11g May 18, 2025
208a3ee
[Change] change `onMapLoaded` calling time when after `onMapReady` ca…
note11g May 18, 2025
f77cb6c
[Chore] add example to use `onMapLoaded`
note11g May 18, 2025
635622d
Add `NaverMap.onMapLoaded` (#315)
note11g May 18, 2025
337080b
[Add] add `onMapLongTapped` on `NaverMap` widget. and `_NaverMapContr…
note11g May 29, 2025
305f834
[Impl, iOS] impl `onMapLongTapped` on iOS Platform (`NaverMapControlS…
note11g May 29, 2025
b58b203
[Impl, Android] impl `onMapLongTapped` on Android Platform (`NaverMap…
note11g May 29, 2025
da34d37
[Chore] add example onMapLongTapped with snackbar
note11g May 29, 2025
a55b580
[Chore] add example display on tap listeners(`onMapTapped`, `onSymbol…
note11g May 29, 2025
0406ffe
[Add] add NPolygonOverlay.outlinePattern feature.
note11g May 29, 2025
c0e3ec8
[Impl, Android] impl `NPolygonOverlay.outlinePattern` feature on Andr…
note11g May 29, 2025
a660493
[Impl, iOS] impl `NPolygonOverlay.outlinePattern` feature on iOS Plat…
note11g May 29, 2025
7e46f81
[Fix, iOS] fix to use px on `NPolygonOverlay.outlinePattern` (diff wi…
note11g May 29, 2025
4c96f96
[Change, iOS] change getting display scale method to DisplayUtil with…
note11g May 29, 2025
51e7117
[Change, iOS] remove unnecessary cast with round
note11g May 29, 2025
a19f240
[Change, iOS] change `CalcUtil` to struct
note11g May 29, 2025
c859b3f
[Change, Android] remove unnecessary cast
note11g May 29, 2025
14e2e45
[Chore] example add snackbar theme
note11g May 29, 2025
efb0ea8
Merge pull request #1 from fogbar/feature-custom-style
fogbar Jun 8, 2025
5580467
iOS - customStyle 대응
fogbar Apr 25, 2025
c81a789
Android - customStyle 대응
fogbar Apr 25, 2025
7197811
Merge branch 'feature-custom-style' of https://github.com/fogbar/flut…
fogbar Jun 8, 2025
98b8ce6
onCustomStyleLoaded, onCustomStyleLoadFailed 이벤트 리스너 추가 중
fogbar Jun 15, 2025
2693319
Android 정상적으로 Load 시 onCustomStyleLoaded 출력되는 것 확인
fogbar Jun 15, 2025
c5137f8
Merge branch 'feature-custom-style' into main
fogbar Jun 15, 2025
2e1a5c9
Merge pull request #2 from fogbar/main
fogbar Jun 15, 2025
ffdf021
Revert "onCustomStyleLoaded, onCustomStyleLoadFailed 이벤트 리스너 추가"
fogbar Jun 15, 2025
17bb472
Merge pull request #3 from fogbar/revert-2-main
fogbar Jun 15, 2025
d0e0bda
Revert "Revert "onCustomStyleLoaded, onCustomStyleLoadFailed 이벤트 리스너 …
fogbar Jun 15, 2025
706f1cf
Merge pull request #4 from fogbar/revert-3-revert-2-main
fogbar Jun 15, 2025
fec516d
Revert "Merge branch 'feature-custom-style' into main"
fogbar Jun 15, 2025
eaa8e2f
Merge pull request #5 from fogbar/main
fogbar Jun 15, 2025
a591c7b
[Add] add common code and message type `_NRawNativeException`, add s…
note11g Jun 20, 2025
e0999da
[Update] using `NAuthFailedException._fromMessageable` when parse arg…
note11g Jun 20, 2025
c4a1ee9
[Change] change type of `_NaverMapControlHandler.onCustomStyleLoadFa…
note11g Jun 20, 2025
51db556
[Add, iOS] add common native exception type `NFlutterException`
note11g Jun 20, 2025
9b89821
[Add, Android] add common native exception type `NFlutterException`
note11g Jun 20, 2025
d8b88b3
[Update, iOS] using common native exception type `NFlutterException` …
note11g Jun 20, 2025
8a0a0df
[Update, Android] using common native exception type `NFlutterExcepti…
note11g Jun 20, 2025
f0c1dec
[Update, iOS] using common native exception type `NFlutterException` …
note11g Jun 20, 2025
0c56a8a
[Update, Android] using common native exception type `NFlutterExcepti…
note11g Jun 20, 2025
69d2ed4
kotlin/DefaultTypeConverter asString 관련 삭제
fogbar Jun 22, 2025
6f40c99
[Update, Android] Support nullable options in map configuration
note11g Jul 13, 2025
4fea3d8
[Update] Support sending nullable value on `NPayload.make` constructor.
note11g Jul 13, 2025
ad8fcf0
[Update] Support sending to native(with NPayload) nullable value on `…
note11g Jul 13, 2025
f285005
[Update, iOS] Support nullable options in map configuration
note11g Jul 13, 2025
12465ac
Merge remote-tracking branch 'fogbar/feature-custom-style' into featu…
note11g Jul 13, 2025
7ca084e
[Chore, Android] add `NaverMapControlSender.dispose` and migrate `Nav…
note11g Jul 13, 2025
b2a4d7b
[Fix, Android] Preserve customStyleCallback when updating customStyle…
note11g Jul 13, 2025
c1ddc1f
[Fix, iOS] Preserve customStyleCallback when updating customStyleId d…
note11g Jul 13, 2025
5d18d31
[Chore, iOS] add `NaverMapControlSender.dispose` and migrate `NaverMa…
note11g Jul 13, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ internal object ApplyUtil {
"maxZoom" to { it::setMaxZoom },
"maxTilt" to { it::setMaxTilt },
"locale" to { it::setLocale },
"customStyleId" to { it::setCustomStyleId },
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dev.note11.flutter_naver_map.flutter_naver_map.applier.option

import com.naver.maps.map.CameraUpdate
import com.naver.maps.map.NaverMap
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asString
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asBoolean
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asDouble
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asFloat
Expand Down Expand Up @@ -154,4 +155,8 @@ class NaverMapApplierImpl(
val nLocale = NLocale.fromMessageable(rawLocale)
naverMap.locale = nLocale?.toLocale()
}

override fun setCustomStyleId(rawCustomStyleId: Any) {
naverMap.customStyleId = rawCustomStyleId.toString()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ internal interface NaverMapOptionApplier {
fun setMaxZoom(rawLevel: Any)
fun setMaxTilt(rawTilt: Any)
fun setLocale(rawLocale: Any)
fun setCustomStyleId(rawCustomStyleId: Any)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.note11.flutter_naver_map.flutter_naver_map.applier.option

import com.naver.maps.map.NaverMapOptions
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asString
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asBoolean
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asDouble
import dev.note11.flutter_naver_map.flutter_naver_map.converter.DefaultTypeConverter.asFloat
Expand Down Expand Up @@ -155,4 +156,8 @@ class NaverMapOptionApplierImpl(
val nLocale = NLocale.fromMessageable(rawLocale)
options.locale(nLocale?.toLocale())
}

override fun setCustomStyleId(rawCustomStyleId: Any) {
options.customStyleId(rawCustomStyleId.toString())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ internal interface NaverMapControlSender {
fun onCameraIdle()

fun onSelectedIndoorChanged(selectedIndoor: IndoorSelection?)

fun onCustomStyleLoaded()

fun onCustomStyleLoadFailed(exception: Exception)
}
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@ internal class NaverMapController(
channel.invokeMethod("onSelectedIndoorChanged", selectedIndoor?.toMessageable())
}

override fun onCustomStyleLoaded() {
channel.invokeMethod("onCustomStyleLoaded", null)
}

override fun onCustomStyleLoadFailed(exception: Exception) {
channel.invokeMethod("onCustomStyleLoadFailed", exception)
}

/*
--- remove ---
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.note11.flutter_naver_map.flutter_naver_map.converter

internal object DefaultTypeConverter {
fun Any.asString(): String = this as String
fun Any.asBoolean(): Boolean = this as Boolean
fun Any.asDouble(): Double = this as Double
fun Any.asFloat(): Float = if (this is Double) toFloat() else this as Float
Expand Down
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옵션의 customStyleId가 바뀌게 되면, 해당 콜백이 실행되는지 여부와
지도가 로드된 후에 바뀌는 것이 가능한지 여부에 대해 테스트가 필요합니다.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android 테스트 기준

  • ID 변경 적용됨
  • null -> id exist 적용됨
  • id exist -> null 적용 안됨 (확인 필요)

This comment was marked as resolved.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

styleId에 대한 동적 변경이 동작하므로, 구현이 바뀌어야 할 것으로 보입니다.

Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ internal class NaverMapView(

private fun setMapTapListener() {
isListenerRegistered = true

naverMap.run {
setOnMapClickListener { pointFPx, latLng ->
naverMapControlSender.onMapTapped(NPoint.fromPointFWithPx(pointFPx), latLng)
Expand All @@ -102,6 +103,19 @@ internal class NaverMapView(
addOnCameraChangeListener(naverMapControlSender::onCameraChange)
addOnCameraIdleListener(naverMapControlSender::onCameraIdle)
addOnIndoorSelectionChangeListener(naverMapControlSender::onSelectedIndoorChanged)


/** Tap Listener 는 아니지만, 따로 setInitHandler와 같이 메소드를 만들지 않고, 기존 메소드에 추가. Listener 종류가 많아지면 용도에 맞게 분리되면 좋을 것 같음 */
customStyleId = naverMapViewOptions.naverMapOptions.getCustomStyleId() // nullable
setCustomStyleId(customStyleId, object : NaverMap.OnCustomStyleLoadCallback {
override fun onCustomStyleLoaded() {
naverMapControlSender.onCustomStyleLoaded()
}

override fun onCustomStyleLoadFailed(exception: Exception) {
naverMapControlSender.onCustomStyleLoadFailed(exception)
}
})
}
}

Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_naver_map: dafe40026d3b4739fdff4ae32953021b1b52b0c2
integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e
flutter_naver_map: efcc30f2bb0eaacdb14f41b5a26696b3ca1e3319
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
NMapsGeometry: 4e02554fa9880ef02ed96b075dc84355d6352479
NMapsMap: 8e7e35c2446e7c4a88d6dd0d64aa0d1de903e4f0
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2

PODFILE CHECKSUM: 865bfa77219454a712543ad6494f6458c48be43e

Expand Down
10 changes: 10 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class _FNMapPageState extends State<FNMapPage> {
onCameraChange: onCameraChange,
onCameraIdle: onCameraIdle,
onSelectedIndoorChanged: onSelectedIndoorChanged,
onCustomStyleLoaded: onCustomStyleLoaded,
onCustomStyleLoadFailed: onCustomStyleLoadFailed,
);
}

Expand Down Expand Up @@ -122,6 +124,14 @@ class _FNMapPageState extends State<FNMapPage> {
// ...
}

void onCustomStyleLoaded() {
// ...
}

void onCustomStyleLoadFailed(Exception exception) {
// ...
}

NOverlayImage? clusterIcon;

@override
Expand Down
Loading