All Projects → ivan114 → IVBezierPathRenderer

ivan114 / IVBezierPathRenderer

Licence: MIT license
Alternative Path Renderer for Apple MapKit to render path with bezier curve

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to IVBezierPathRenderer

Bezier.py
➰ Create Bezier curves in Python [Mirror]
Stars: ✭ 22 (-29.03%)
Mutual labels:  bezier-curves
Visual-Effects-Shadow
Add a drop shadow to a UIVisualEffectView using a 9-part UIImage.
Stars: ✭ 56 (+80.65%)
Mutual labels:  mapkit
MKMapView-ZoomLevel
MKMapView category with zoom level extension.
Stars: ✭ 23 (-25.81%)
Mutual labels:  mapkit
React Designer
It's not art
Stars: ✭ 1,762 (+5583.87%)
Mutual labels:  bezier-curves
MapTable-Swift
Mimic Find My Friends first screen behavior
Stars: ✭ 69 (+122.58%)
Mutual labels:  mapkit
Uber
iOS Ride-Sharing App written in Swift 4 Using Map Kit and Core Data
Stars: ✭ 30 (-3.23%)
Mutual labels:  mapkit
shapekeyimport
Blender add-on to import shapekeys
Stars: ✭ 31 (+0%)
Mutual labels:  bezier-curves
bezmouse
Simulate human mouse movements with xdotool
Stars: ✭ 110 (+254.84%)
Mutual labels:  bezier-curves
web-maps-wcag-evaluation
Manual accessibility evaluation of popular web map tools.
Stars: ✭ 28 (-9.68%)
Mutual labels:  mapkit
phaser3-plugin-pathbuilder
Draw and edit Lines, Bezier Curves, Splines at runtime, explore your scene and export your paths to Phaser
Stars: ✭ 67 (+116.13%)
Mutual labels:  bezier-curves
Bezierinfo 2
The development repo for the Primer on Bézier curves, https://pomax.github.io/bezierinfo
Stars: ✭ 1,843 (+5845.16%)
Mutual labels:  bezier-curves
react-mapkit
React wrapper for Apple's mapkit.js.
Stars: ✭ 71 (+129.03%)
Mutual labels:  mapkit
iOS-MapKit-Tutorial
iOS MapKit Getting Started
Stars: ✭ 24 (-22.58%)
Mutual labels:  mapkit
flo curves
Bezier curve library for Rust
Stars: ✭ 48 (+54.84%)
Mutual labels:  bezier-curves
SwiftUI-bez
Utilities for working with bezier curves in SwiftUI
Stars: ✭ 80 (+158.06%)
Mutual labels:  bezier-curves
cloud gen
Procedural Generation of Clouds with Vector Graphics
Stars: ✭ 46 (+48.39%)
Mutual labels:  bezier-curves
PinFloyd
MapKit annotations clustering for iOS
Stars: ✭ 29 (-6.45%)
Mutual labels:  mapkit
GoogleMapsTileOverlay
GoogleMapsTileOverlay lets you customize Apple Maps MKMapView with the Google Maps StylingWizard
Stars: ✭ 68 (+119.35%)
Mutual labels:  mapkit
bezier-editor
A tool base on HTML5 canvas to create bezier curve like photoshop and then it can be exported as JavaScript code to create an animation path for an HTML element.
Stars: ✭ 21 (-32.26%)
Mutual labels:  bezier-curves
mapkit-android-demo
MapKit Android demo
Stars: ✭ 92 (+196.77%)
Mutual labels:  mapkit

IVBezierPathRenderer

CI Status Version License Platform

Introduction

MapKit framework provide us useful classes for drawing simple path in MKMapView. However, those lines draw with MKPolylineRenderer are too plat and unstylized, and most importantly, no bezier path, which is not sufficient for my map application usage. Therefore, IVBezierPathRenderer is created for more natural map path drawing.

Screenshots

Screenshots

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

IVBezierPathRenderer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "IVBezierPathRenderer"

After installing the pod add the following import header to your source code

@import IVBezierPathRenderer;

Usage

IVBezierPathRenderer is easy to use. Just create your MKPolyline and MKPolylineRenderer as usual, then replace your MKPolylineRenderer object with IVBezierPathRenderer object. That is all need to be done.

Swift:

func mapView(mapView: MKMapView, rendererForOverlay overlay: MKOverlay) -> MKOverlayRenderer {
	if let overlay = overlay as? MKPolyline{
		let renderer = IVBezierPathRenderer(overlay:overlay)
		renderer.strokeColor = UIColor.blueColor().colorWithAlphaComponent(0.5)
		renderer.lineWidth = 4
		//Optional Tension for curve, default: 4
	 	//renderer.tension = 2.5
		//Optional Border
		//renderer.borderColor = renderer.strokeColor
		//renderer.borderMultiplier = 1.5
		return renderer
	}
}

Objective-C:

-(MKOverlayRenderer*)mapView:(MKMapView*)mapView rendererForOverlay:(id<MKOverlay>) overlay{
	 if([overlay isKindOfClass:[MKPolyline class]]){
	 	IVBezierPathRenderer *renderer = [[IVBezierPathRenderer alloc] initWithOverlay:overlay];
	 	renderer.strokeColor = [[UIColor blueColor] colorWithAlphaComponent:0.5f];
	 	renderer.lineWidth = 4;
	 	//Optional Tension for curve, default: 4
	 	//renderer.tension = 2.5;
	 	//Optional Border
		//renderer.borderColor = renderer.strokeColor;
		//renderer.borderMultiplier = 1.5;
	 	return renderer;
	 }
 }

For gradient line use:

-(instancetype)initWithOverlay:(id<MKOverlay>)overlay colors:(NSArray *)colors tension:(NSNumber *)tension

Author

Ivan Li, [email protected]

References

License

IVBezierPathRenderer is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].