Giter Site home page Giter Site logo

mapkitdynroutes's Introduction

MapKitDynRoutes

iOS4 library to manage dynamic routes on MKMapView. This library tries to handle the lack of methods to manage growing routes without repainting all of those anytime.

## Features FFMapRoute(s) provide two classes that manage a growing route using an algorithm to aggregate points without having the polyline to be redraw/regenerated every time a new point is acquired.
Furthemore, this set of classes, comes with a simulator that injects coordinates using a timer.

How it works

It works using an incremental way to add segments based on a integer factor.
That value is called kAGGREGATION_FACTOR and its value is set to 3, by default (please, check "kAGGREGATION_FACTOR" macro in "FFMapRoutes.h").
In order to explain it better, I'm going to drop you an example.

Let's say the factor is 3 and the tracking begins.
The segment sequence will be:

A-B, B-C, C-D

-- aggregation -- A-B-C-D -- end of aggregation --

A-B-C-D, D-E, E-F, F-G

-- aggregation -- A-B-C-D, D-E-F-G -- end of aggregation --

A-B-C-D, D-E-F-G, ..

-- aggregation -- ... -- end of aggregation --

A-B-C-D, D-E-F-G, G-H-I-J

-- aggregation -- A-B-C-D-E-F-G-H-I-J -- end of aggregation --

and so on.

Requirements

  • Xcode 3.2.3 with iOS 4 SDK or Xcode 4 Preview.

  • Project file (.xcodeproj) needs to:

    1. C/C++ Compiler Version (GCC_VERSION) set to "LLVM compiler 1.5"
    2. Other C Flags (OTHER_CFLAGS) should add "-Xclang -fobjc-nonfragile-abi2" flags.
    3. Base SDK (SDKROOT) should be "iPhone Device 4.0"
    4. Deployment Target (IPHONEOS_DEPLOYMENT_TARGET) can be "iPhone OS 3.1" if you want.

Note

-Xclang here means "pass argument to the clang compiler," and the argument is -fobjc-nonfragile-abi2. So you should add '"-Xclang -fobjc-nonfragile-abi2"' into $OTHER_CFLAGS as single argument that contains one space in between, and not add them as two arguments like '-Xclang -fobjc-nonfragile-abi2'.

For more details, check "-Xclang -fobjc-nonfragile-abi2" is single flag with one argument.

Thanksgiving

I want to say thanks to Walter 'DaK_TaLeS' for spending few nights talking about how to develop the algorithm used by this library and for supporting (and injuring) me all the time.

License

This library and the associated demo are licensed under MIT license.
However, if you are using this library and you want to share with me the fact that it suits your needs, please drop me a line. I'll be glad to hear that.

Fabiano 'elbryan' Francesconi

mapkitdynroutes's People

Contributors

franzhcs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.