Free Hand Drawing on Apple Maps

This is kinda a note based on the learning I've had working with the Free Hand Drawing(FHD in short) on all the major Maps(Google, Mapbox & Apple Maps) on the market.

So, If you'd like to have an in-depth technical understanding, please refer this post which was my first experience with FHD on Google Maps that delves deep into the Google Maps SDK explaining the FHD functionality & its implementation.
And to get a context on the Mapbox based FHD solution, please do refer this blog.

What I learned with Apple Maps:
Apple Maps iOS SDK doesn't differ much from Mapbox iOS SDK, most of the API's has almost the same signatures/pattern, it almost looks like a copy-paste from a developer(API User)'s perspective, Not sure if Apple Copied from Mapbox or vice-versa(I pick this), but the mapping system works totally different internally especially w.r.t the FHD features like polylines, polygons etc. The FHD works smoother on Apple Maps and there are some major differences specifically while drawing a polygon on Apple Maps & Mapbox.


Here's the gist of it:

I tried drawing the polygon(Nearly the same) on both the maps and here's result on the Apple Maps:


And this is the result of the Mapbox:







































Are you seeing the difference?

When you get the Polygon object from the Mapbox, it gives you all the intersecting & overlapping polygons altogether, so it is your job to decide on which one you want & omit others, which is unnecessary work in most of the use cases, where you'd end up wasting your valuable time re-inventing the wheel by writing a lot of algorithms just to get rid of those intersecting/overlapping areas in the polygon drawn.

However, the Apple Maps polygon does all those tedious work for you and gives you the polygon by omitting those intersecting/overlapping polygon and also does a pretty good job of displaying the same on the Map View as well.

Google Maps also behaves similar to the Apple Maps in most of the FHD use cases.


For some reason, If you're stuck/planning to use Mapbox, then stay tuned for more updates in my next blog as I've done some good amount of work in that area of deciphering the polygon coordinates to phase out those intersecting/overlapping polygons.

Here's the open-source sample code that does all those amazing stuff.

Share it across, if you've found it useful, let the needy rejoice.

Have Fun!



Comments

Popular posts from this blog

Free Hand Drawing on Google's Map View

Android from iOS Guy's Perspective

Free Hand Drawing on Maps with MapBox SDK