Commit c0ba4855 authored by 7c00's avatar 7c00

优化 ios overlays

parent 98e00e02
......@@ -49,11 +49,13 @@
if (_strokeColor == nil) {
_strokeColor = UIColor.blackColor;
}
_circle = [MACircle circleWithCenterCoordinate:_coordinate radius:_radius];
_renderer = [[MACircleRenderer alloc] initWithCircle:_circle];
_renderer.lineWidth = _strokeWidth;
_renderer.strokeColor = _strokeColor;
_renderer.fillColor = _fillColor;
if (_renderer == nil) {
_circle = [MACircle circleWithCenterCoordinate:_coordinate radius:_radius];
_renderer = [[MACircleRenderer alloc] initWithCircle:_circle];
_renderer.lineWidth = _strokeWidth;
_renderer.strokeColor = _strokeColor;
_renderer.fillColor = _fillColor;
}
return _renderer;
}
......
......@@ -4,7 +4,7 @@
#pragma ide diagnostic ignored "OCUnusedClassInspection"
@interface AMapCircleManager : RCTViewManager <MAMapViewDelegate>
@interface AMapCircleManager : RCTViewManager
@end
@implementation AMapCircleManager {
......
......@@ -3,7 +3,7 @@
#pragma ide diagnostic ignored "OCUnusedClassInspection"
@interface AMapMarkerManager : RCTViewManager <MAMapViewDelegate>
@interface AMapMarkerManager : RCTViewManager
@end
@implementation AMapMarkerManager {
......
......@@ -46,10 +46,12 @@
if (_strokeColor == nil) {
_strokeColor = UIColor.blackColor;
}
_renderer = [[MAPolygonRenderer alloc] initWithPolygon:_polygon];
_renderer.lineWidth = _strokeWidth;
_renderer.strokeColor = _strokeColor;
_renderer.fillColor = _fillColor;
if (_renderer == nil) {
_renderer = [[MAPolygonRenderer alloc] initWithPolygon:_polygon];
_renderer.lineWidth = _strokeWidth;
_renderer.strokeColor = _strokeColor;
_renderer.fillColor = _fillColor;
}
return _renderer;
}
......
......@@ -4,7 +4,7 @@
#pragma ide diagnostic ignored "OCUnusedClassInspection"
@interface AMapPolygonManager : RCTViewManager <MAMapViewDelegate>
@interface AMapPolygonManager : RCTViewManager
@end
@implementation AMapPolygonManager {
......
......@@ -94,13 +94,14 @@
if (_color == nil) {
_color = UIColor.blackColor;
}
_renderer = [[MAMultiColoredPolylineRenderer alloc] initWithMultiPolyline:_polyline];
_renderer.lineWidth = _width;
_renderer.strokeColor = _color;
_renderer.strokeColors = _colors;
_renderer.lineDash = _dashed;
_renderer.gradient = _gradient;
if (_renderer == nil) {
_renderer = [[MAMultiColoredPolylineRenderer alloc] initWithMultiPolyline:_polyline];
_renderer.lineWidth = _width;
_renderer.strokeColor = _color;
_renderer.strokeColors = _colors;
_renderer.lineDash = _dashed;
_renderer.gradient = _gradient;
}
return _renderer;
}
......
......@@ -4,7 +4,7 @@
#pragma ide diagnostic ignored "OCUnusedClassInspection"
@interface AMapPolylineManager : RCTViewManager <MAMapViewDelegate>
@interface AMapPolylineManager : RCTViewManager
@end
@implementation AMapPolylineManager {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment