OpenSeaMap Forum

For new registrations: Please create and activate an account. Afterwards send an email to forum.openseamap@gmail.com including a short message and your username to get write access to this forum. Thanks!
Für neue Registrierungen: Bitte erstelle einen neuen Account und schalte ihn frei. Anschließend sende eine kurze Mail mit deinem Nutzernamen an forum.openseamap@gmail.com um Schreibzugriff für dieses Forum zu bekommen. Danke!

You are not logged in.

#1 2015-11-04 05:30:58

Aurora
Member
Registered: 2015-11-04
Posts: 2

Trying to get Mac MapKit rendering working

I have this code:

- (void)viewDidLoad {
    [super viewDidLoad];

    [[self mapView]setShowsUserLocation:YES];
   
    NSString *streetMaps = @"http://tile.openstreetmap.org/{z}/{x}/{y}.png";
    MKTileOverlay *overlay = [[MKTileOverlay alloc] initWithURLTemplate:streetMaps];
    overlay.canReplaceMapContent = YES;                       
    [[self mapView] addOverlay:overlay level:MKOverlayLevelAboveLabels];
       
}


- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id)overlay {
    if ([overlay isKindOfClass:[MKTileOverlay class]]) {
        return [[MKTileOverlayRenderer alloc] initWithTileOverlay:overlay];
    }
    return nil;
}

Which works well enough with OSM.  Is there a similar tile service for OpenSeaMap?  What url do I use for that?

Also, does the sea map url include all the data or just the marine features?  Do I need two overlays to get all the data I want?

I'm new to this and having trouble getting going.  Thanks.

Offline

#2 2015-11-04 05:43:08

malcolmh
Member
From: Hull, UK
Registered: 2012-09-05
Posts: 185

Re: Trying to get Mac MapKit rendering working

The URL for OpenSeaMap tiles is: http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png

These are transparent tiles that can be overlaid on the OpenStreetMap tiles.


Malcolm Herring, Developer

Offline

#3 2015-11-04 15:39:01

Aurora
Member
Registered: 2015-11-04
Posts: 2

Re: Trying to get Mac MapKit rendering working

malcolmh wrote:

The URL for OpenSeaMap tiles is: http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png

These are transparent tiles that can be overlaid on the OpenStreetMap tiles.

Oh that explains a lot.  Thanks so much!  I have it working nicely now.

New question...how do I run my own local map server?  IOW - how do I get the data and run my own tile server?

Offline

#4 2015-11-05 16:48:36

kannix
Member
From: Ruhrgebiet
Registered: 2013-10-27
Posts: 127
Website

Re: Trying to get Mac MapKit rendering working

Aurora wrote:

... IOW - how do I get the data and run my own tile server?

This indeed brings an old question back in focus! There is still is no public exchange of bundled seamark tile-sets.

Suggestions for further reading:
- http://wiki.openstreetmap.org/wiki/Tile … ownloading
- http://kap.grade.de/inland-chart-ol2.html

Have a nice day, Dirk

Offline

Board footer

Powered by FluxBB