Posts

Showing posts with the label Draw Polylines on MapView

Working out Concave/Convex Hull

This post is nearly like a continuation of my previous post.  But not necessarily need to be followed. This post itself is a note on my learnings with finding out a concave hull solution for a project that I worked on recently. Requirements: We had a requirement where the user would simply freehand draw (FHD) on a map view and we should be able to fetch the list of users located/contained in that region. Our Tools: We used MongoDB as the backend, which provides us with beautiful queries/API's  fast enough to search the list of users(we have in our DB) within a given polygon (Polygon = Freehand drawing enclosed with the starting & ending points, hence forming a region). The only issue with MongoDB search is that it expects a perfect polygon with no intersection at all. If a single point in the polygon intersects then it'll simply throw out an error . Not sure if MongoDB guys did this intentionally, but it leaves its users with a huge burden/workaround to handle ...

Free Hand Drawing on Apple Maps

Image
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 di...

Free Hand Drawing on Maps with MapBox SDK

Recently, I got to work on the MapBox SDK for iOS. So, this is a short journal of my experience with it. Basically, it's a MapBox SDK based freehand drawing article. For those who are here for Google Maps based solution, then please refer this blog  which is again based on  this lib . This is not a Google Maps Vs MapBox debate as well, please make up your mind before starting up. [Note: Am not aware of the updates to the Google Maps SDK since 2015] So, let's start with what I've got to say. I've already created a Freehand Drawing(FHD, in short) tool, implemented way back in 2015, which was based on the Google Maps SDK, hence for MapBox based FHD solution, I was already 50% done. In the existing implementation, I have the touch detection and coordinates collection, polyline drawing & polygon drawing logics already implemented and in place, but all of them were using the GoogleMaps API's. So, the 2 main parts/API's that I'll need to look in M...

Free Hand Drawing on Google's Map View

Recently, I got a chance to work on a project, where we needed to provide an ability to users of an iOS app to draw on Maps. Basically, we decided to go with Google Maps, because of its overall coverage and its popularity. Hence, we used  Google Maps SDK for iOS  and we wanted to implement "Free Hand Drawing on the Google Maps". To do so, I started searching around the internet for some good resources, but weren't able to find any good one that could just be used like Plug and Play. We had to do a lot of handling on our own and hence decided to write a blog post and a sample project just to make it useful for others, so that others in the same path don't struggle much like me. If you are only planning to draw a Polygon on the Map (As most of them do), then may be you don't have to read the entire post. Instead just follow these steps: (i) Copy & Paste these Folders into your project: "SARMapDrawView", "Categories" & "Models...