Skip to content

Commit

Permalink
0.9.4 iOS 작업완료
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpark-lbstech committed Feb 26, 2021
1 parent 4a67a2f commit 6ffa040
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion example/lib/marker_map_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _MarkerMapPageState extends State<MarkerMapPage> {
captionTextSize: 20.0,
alpha: 0.8,
icon: image,
anchor: AnchorPoint(0, 0),
anchor: AnchorPoint(0.5, 1),
width: 45,
height: 45,
infoWindow: '인포 윈도우',
Expand Down Expand Up @@ -173,6 +173,10 @@ class _MarkerMapPageState extends State<MarkerMapPage> {
}

void _onMarkerTap(Marker marker, Map<String, int> iconSize) {
int pos = _markers.indexWhere((m) => m.markerId == marker.markerId);
setState(() {
_markers[pos].captionText = '선택됨';
});
if (_currentMode == MODE_REMOVE) {
setState(() {
_markers.removeWhere((m) => m.markerId == marker.markerId);
Expand Down
1 change: 1 addition & 0 deletions example/lib/padding_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class _PaddingTestState extends State<PaddingTest> {
onMapCreated: _onMapCreated,
initLocationTrackingMode: LocationTrackingMode.Follow,
locationButtonEnable: true,
contentPadding: EdgeInsets.only(left: 150),
),
Align(
alignment: Alignment.bottomCenter,
Expand Down
9 changes: 9 additions & 0 deletions ios/Classes/src/NaverMapController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ protocol NaverMapOptionSink {
func setSymbolScale(_ symbolScale: CGFloat)
func setSymbolPerspectiveRatio(_ symbolPerspectiveRatio: CGFloat)
func setActiveLayers(_ activeLayers: Array<Any>)
func setContentPadding(_ paddingData: Array<CGFloat>)

func setRotationGestureEnable(_ rotationGestureEnable: Bool)
func setScrollGestureEnable(_ scrollGestureEnable: Bool)
Expand All @@ -29,6 +30,7 @@ protocol NaverMapOptionSink {


class NaverMapController: NSObject, FlutterPlatformView, NaverMapOptionSink, NMFMapViewTouchDelegate, NMFMapViewCameraDelegate, NMFAuthManagerDelegate {

var mapView : NMFMapView
var naverMap : NMFNaverMapView
let viewId : Int64
Expand Down Expand Up @@ -330,6 +332,9 @@ class NaverMapController: NSObject, FlutterPlatformView, NaverMapOptionSink, NMF
if let locationButtonEnable = option["locationButtonEnable"] as? Bool{
sink.setLocationButtonEnable(locationButtonEnable)
}
if let paddingData = option["contentPadding"] as? Array<CGFloat> {
sink.setContentPadding(paddingData)
}
}

// Naver touch Delegate method
Expand Down Expand Up @@ -451,6 +456,10 @@ class NaverMapController: NSObject, FlutterPlatformView, NaverMapOptionSink, NMF
mapView.positionMode = NMFMyPositionMode(rawValue: locationTrackingMode)!
}

func setContentPadding(_ paddingData: Array<CGFloat>) {
mapView.contentInset = UIEdgeInsets(top: paddingData[1], left: paddingData[0], bottom: paddingData[3], right: paddingData[2])
}

func setLocationButtonEnable(_ locationButtonEnable: Bool) {
naverMap.showLocationButton = locationButtonEnable
}
Expand Down
2 changes: 1 addition & 1 deletion ios/naver_map_plugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'naver_map_plugin'
s.version = '0.9.2'
s.version = '0.9.4'
s.summary = 'flutter naver map plugin'
s.description = <<-DESC
flutter naver map plugin
Expand Down

0 comments on commit 6ffa040

Please sign in to comment.