mktileoverlay

Prevent replacing of WMS Overlay while adding Polygon or Polyline to MKMapView

风格不统一 提交于 2019-12-25 00:32:33
问题 I have implemented Web Map Service in the MKMapView by subclassing the MKTileOverlay & rendering it using MKTileOverlayRenderer . It works fine and displays the custom map properly. When I call method like mapView.addOverlay(polyLine) to add Polyline or Polygon. The WMS overlay gets replaced with the Apple Maps overly. // Set up the overlay and adds it to MKMapView. func setupTileRenderer() { let wmsURL = formTemplate?.wmsURL let overlay = WMSTileOverlay(urlTemplate: wmsURL) overlay

Why MKTileOverlay repeats same tile over and over for openstreet map in ios, swift4

百般思念 提交于 2019-12-06 09:26:19
问题 I'm using OpenStreet map to with our own map server with iOS. for iOS I couldn't find any third party library (free or paid) which can use with our open StreetMap server. then I decided to go with MKMapView using MKTileOverlay like below : added a MapKit outlet to my storyboard. made a outlet connection and set delegates to self using storyboard and then here is my viewdidload method. let urltemplate = "http://tile.openstreetmap.org/17/94621/62995.png" let overlay = MKTileOverlay(urlTemplate:

MKTileOverlay with Retina-Tiles

回眸只為那壹抹淺笑 提交于 2019-12-06 01:43:25
问题 I have issues to load 512x512px tiles in MKMapKit. The Server provides 512x512 .jpeg tiles. I could not find any solution or sample implementation for custom retina tiles in MKMapView. What I do: When I load them into MKMapView with overlay = [[MKTileOverlay alloc] initWithURLTemplate:template]; overlay.tileSize = CGSizeMake(512.0f, 512.0f); [_mapView insertOverlay:overlay atIndex:MAP_OVERLAY_INDEX_TILE level:MKOverlayLevelAboveLabels]; … tiles are scaling correct but only half of them is

MKTileOverlay with Retina-Tiles

风流意气都作罢 提交于 2019-12-04 05:36:06
I have issues to load 512x512px tiles in MKMapKit. The Server provides 512x512 .jpeg tiles. I could not find any solution or sample implementation for custom retina tiles in MKMapView. What I do: When I load them into MKMapView with overlay = [[MKTileOverlay alloc] initWithURLTemplate:template]; overlay.tileSize = CGSizeMake(512.0f, 512.0f); [_mapView insertOverlay:overlay atIndex:MAP_OVERLAY_INDEX_TILE level:MKOverlayLevelAboveLabels]; … tiles are scaling correct but only half of them is loaded (not only visually - i sniffed the requests and the tiles are missing) with overlay = [