Custom overlay on Google Map?

general question: is it possible to create an inscription (or more than one overlay) over Google Map using the iPhone map set? Thanks for any comments.

+3
source share
3 answers

If you are interested in rendering images or overlaying graphic fragments, rather than vector forms, the subclass MKOverlayView and the definition of [-canDrawMapRect: zoomScale] and [drawMapRect: zoomScale: inContext:] can do it for you.

I have an example that uses [-canDrawMapRect: zoomScale] to check the local cache and asynchronously handle the load on the tiles (if the tile is not cached), and then [drawMapRect: zoomScale: inContext:] to handle rendering of UIImage in the context of CoreGraphics.

http://github.com/mtigas/iOS-MapLayerDemo

+3
source

when you mean Shapes drawing like Polygon, Polyline and things like that you can use MKOverlay (really good with iOS 4). two steps must be completed: - use "addOverlay" to add one (or more) overlay (s) 2 use (MKOverlayView *) mapView: (MKMapView *) mapView viewForOverlay: (id) overlay to clearly indicate what Overlay looks like.

0
source

MKOverlay. 13 , - .

For a good example code, check out the Apple TileMap sample from WWDC 2010.

0
source

Source: https://habr.com/ru/post/1755938/


All Articles