OpenSeaMap Forum

New registrations / Neue Registrierungen

Please create and activate an account. Afterwards send an email to forum@openseamap.eu including a short message and your username to get write access to this forum. Thanks!

Bitte erstelle einen neuen Account und schalte ihn frei. Anschließend sende eine kurze Mail mit deinem Nutzernamen an forum@openseamap.eu um Schreibzugriff für dieses Forum zu bekommen. Danke!

Maintenance window / Wartungsfenster

This server undergoes periodic maintenance and will be unavailable for a few minutes between 00:00 UTC and 01:30 UTC at the first day of the month. New posts during that time could potentially be lost.

Dieser Server wird regelmäßig gewartet und ist deshalb für einige Minuten zwischen 00:00 UTC und 01:30 UTC am Monatsanfang nicht erreichbar. Es kann sein, dass in dieser Zeit erstellte Beiträge verloren gehen.

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: 200

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: 168
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

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman