We are looking for a drawing / mapping SDK for iOS with the following requirements:
Draw multiple polygons on a single view. polygon coordinates are based on earth lat/long
Do not show other map layers from satellite / street view / whatever - just the polygon data
Allow adding layers / text/ bubbles / etc.
Allow zoom in-out
Allow clicking on regions.
Calculate bounding rect automatically, and do not allow the user to scroll out of this area.
Is there an SDK that supports these requirements?
Thanks.
Check out the Mapbox iOS SDK. It's open source, allows you to hide the basemap (or create a custom basemap to whatever appearance you desire), constrain the panning and zooming, add vector polygons atop the baselayer(s), add text and labels, control interactivity, and more.
Related
I am building an iOS app using HERE maps SDK.
I need to fill the area of my polygon with images/textures/patterns. The NMAMapPolygon.customPattern adds the image as a pattern along the borders of the polygon.
Is there a way where I can fill the entire region of the polygon with the image (in a repetitive manner like a texture)?
I'd like to draw a grid into my map, that represents the size of a tile at a certain zoom level. So for example I'd like to have a grid on my mapview that shows the outline of a zoom level 10 tile. So the outline of where this tile would be. No matter if the mapview itself is at zoom level 5 or 15, it should display the outline of where that tile would be placed.
The problem I have is how to calculate the proper rect that represents each visible "tile".
Any help is sooo much appreciated!!!
Or maybe the answer to following question would help:
How can I convert a MKMapRect to a MKTileOverlayPath?
I find that MapKit is way too limited when you want to start doing more and more with maps.
I would reccomend using Google Maps SDK for iOS: https://developers.google.com/maps/documentation/ios/start
and then using GMSTileLayer for the tiles:
https://developers.google.com/maps/documentation/ios/reference/interface_g_m_s_tile_layer
In the long run, replacing MapKit with Google maps gives you far more features and options and has better geolocation and reverse geolocation than Apple
You can also look at Mapbox. Between using TileMill to create a grid layer by setting the Map background to a pattern image, you could then only export zoom level 10 and either host it on Mapbox or export it to MBTiles format (SQLite-based). Then one of the Mapbox mobile toolkits could serve the tiles out as an overlay on your map.
I'm displaying several user's locations on a map simultaneously as circles of different colors.
I can do this using an annotation and then when the user's location updates use UIView:animateWithDuration: to move to their new location.
However there is a requirement that the size of the circles reflects the accuracy of the location i.e. very accurate equals a circle of size 10 meters, rough accuracy is represented as a circle of size 500 meters etc.
However there are two problems using annotations for this - the first is how to transform meters into a CGRect on the correct size to draw on the map. And the second is the annotations need to be resized if the user zooms the map.
So I was looking at using an overlay instead as that already has a radius and automatic resizing during zooming built in so it handles those two problems.
However it looks like overlays are meant to be static and their coordinate property is read only.
Is there some way I can make the overlays move as the user's location moves? (other than completely remove it and re-add it?)
[THis is for iOS 7 only]
I'm looking for a way to overlay the iOS maps with a grid. The complete earth needs to be divided into squares. The location of the user doesn't effect the placement of the squares (In other words; the squares are always placed the same. On every iPhone, no matter where the user is).
I Looked into MKOverlay, but I've never used this so it's very new to me. Also, when zooming in/out should effect the overlay. It's very important that the squares are always covering the same area on the map (For example; A square should be 100mx100m in real world, when you zoom out, the square should cover the same 100x100).
Is there anybody that can point me in the right direction?
Is it possible to draw the grid from een .xml? Example given; On .XML is holding all squares with their coordinates on the map. When the user loads the map, the 100 squares around the user are loaded.
Does anyone have any good sources for me to read on how to draw a geofence on a map in an iOS app?
I want to learn how to freeze a map on a view and allow a user to draw a square, circle, or polygon to set up a geofence.
Thanks!
As of iOS 7, a geofence (CLRegion) can only be a circular region.
CLCircularRegion
If you want to draw on a map view, you can add a transparent custom view on top of the map view and handle the touch events on the transparent view.