Closed thkus closed 9 years ago
You can create a class that overrides RMAbstractWebMapSource and than override method - (NSURL *)URLForTile:(RMTile)tile to modify the URL for fetching tiles. See the class RMOpenStreetMapSource as an example.
Good luck.
Thanks for the reply. I mean we got it working. We are using the RMGenericMapSource and Tiles are loading just fine.
I'm just wondering if the warning, that shows up in the console, is of any concern since we are not using any MapBox (Server)API. We are fetching tiles from our very own tile server.
since upgrading to 1.6.0 the App started crashing because of a missing access token
Where is the crash? I'm guessing in RMMapboxSource
, which is meant to work with the Mapbox servers. Like @andaluz says, you can create your own tile source class to use sources from elsewhere.
As for the warning, RMMapView
uses an RMMapboxSource
by default on setup if not initialized with one, so what are you are probably seeing is that period of time. How long do you wait before setting your own tile source @tosse?
The origin of the crash is in RMConfiguration's
- (NSString *)accessToken;
Probably called by RMMapboxSource
, yes.
Ah okay, i wasn't aware of that since I'm using RMGenericMapSource
to connect to my own tile server. Should i avoid using RMGenericMapSource
then?
I'm initializing the RMMapView
and then immediatly after i set the tile sources.
self.mapView = [[RMMapView alloc] initWithFrame:self.view.frame];
[self.mapView setTileSources:@[awesomeOverlayA, awesomeOverlayB]];
You can use the [[RMMapView alloc] initWithFrame:self.view.frame andTilesource:newTilesource];
method to avoid RMMapView
from loading RMMapboxSource
as default.
Hi there,
We've been using the MapBox SDK successfully in the past to display tiles of our own tile server. Now, since upgrading to 1.6.0 the App started crashing because of a missing access token. We resolved that by signing up and adding the default access token. Now the tiles are loading fine again but we see a warning: "Using watermarked example map ID [...]"
Since we are not using the MapBox-Tiles or API... is this an issue for us? Our App will also be published on the App Store.