Uploading Mapbox Style (Studio) to CartoDB? - mapbox

My basemap made in Mapbox Studio is not uploading to CartoDB. I enter the URL and my Access Token but it just says "This URL not valid"
This is the URL, copied straight from the Mapbox "Share this style" box:
https://api.mapbox.com/styles/v1/s****/cii6i33h6009t91m148mn7y90.html?title=true&access_token=pk.eyJ1Ijoic2hhbmVnYWx3YXkiLCJhIjoiY2lpMWIwMGs5MDA2ZXQza2Zob2NjOWgwNyJ9.EtwsJtB5yhV75-fO9L1yXA#13.007195441591573/42.34777164609585/-71.09705213424535/0

You're getting that error because CartoDB expects a tilelayer URL not a style URL. You've created your map using Mapbox Studio which generates style URL's for use with Mapbox GL (JS or Native). If you want to get a tile URL you have to create your map in Mapbox Studio Classic:
https://www.mapbox.com/studio/classic/
Here's a good read on the differences between the new Mapbox studio and classic:
https://www.mapbox.com/help/upgrading-from-classic/

Related

Leaftet google integration - attribution links not working

I'm using Leaftlet (version 0.7.7) with Google plugin (https://github.com/shramov/leaflet-plugins - version 1.9.3) and I noticed that google attribution links (Terms of use, Report a map error) are not clickable. Is there a fix for it?

Set Map Language with Bing Maps JavaScript V8 API

In Bing Maps V7 there was an mkt param to set the language of the map. This is gone in V8 and instead the browsers default language is used:
The Bing Maps v8 web control no longer requires the use of a mkt
parameter to localize the map. If one is not provided the map will
automatically attempt to set the language of the map based on the
user’s browser settings and/or location.
But we need to set the language according to the website's user setting (which can be different from the browser language). Is there a way to set this using the Bing Maps V8 JavaScript API?
In Bing v8 we can use setLang and setMkt parameters to override the default localization setting.
please find below example for setting localization parameters:
<script type='text/javascript'
src='http://www.bing.com/api/maps/mapcontrol?callback=GetMap&setMkt=en-IN&setLang=en'
async defer>
</script>
Please find the below link from where I found this information :
https://msdn.microsoft.com/en-us/library/mt712553.aspx#Localizing the Map

Get capture date from mapbox satellite imagery

I am following the mapbox tutorial here. I have the static map displaying nicely inside of my web page. I would like to include a capture date on the image provided by map box.
I am using the mapbox.satellite mapId. So, my url looks like this:
https://api.mapbox.com/v4/mapbox.satellite/${lng},${lat},19/1000x700.jpg90?access_token=${accessToken}
My access token is provided by Digital Globe in a trial account. Does anyone know if the capture date is available, and if so, how to retrieve it?

Do I have to use a different Mapbox access token in every page / app?

I'm developing a web application using NodeJS, OpenStreetMaps, Leaflet and Mapbox.
For a while I just use a home page and a register page, both with a map, using this code to display it. Very straight forward, as shown in
Leaflet Quick Start Guide
var map = L.map('map');
map.setView([19.34, -99.15], 12);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox',
maxZoom: 18,
id: <myMapboxMapId>,
accessToken: <myMapboxAccessToken>
}).addTo(map);
I thought that I will use the same code for the entire app, till I add a new page with a map, got really frustrated that the map would not show up, no javascript warning or erros, checked lots of Stackoverflow questions and other forums, without answer.
I made that page a simple html with the leaflet js and css and it didn't show. Just a grey area.
So after a while, I went to Mapbox, create a new access token, place it and it worked.
What I find weird is that I was using the first token on two different pages, working perfect. But not with a third one.
So the question... Do I have to use a different Mapbox access token in every page / app? How does this work?
I've looked in the Mapbox documentation, without answers. Here Mapbox access token docs
Thanks!
No. You can use the same access token on every site if you want. But obviously they all share the same usage counts, so if you hit your limit, all the sites will stop working.

Mapquest Open Aerial new tile server url?

The MapQuest page for open aerial api states that the url will be depreciated on Feb 15, 2013 and no longer work. The page does not list the new URL!!! Anyone know where to find this info? Mapquest?? anyone?
Alert:
The tile URL for the Open Aerial Tiles has changed. Please be aware that accessing
tiles through the oatile subdomain is deprecated and http://oatile1.mqcdn.com/
will be unavailable after February 15, 2013.
The new URL is listed further down on the page; basically oatile1 has changed to otile1, so that the URL is more consistent with URL used for the MapQuest Open Map Tiles.
Here's an example URL for an Open Aerial Tile:
http://otile1.mqcdn.com/tiles/1.0.0/sat/15/5240/12661.jpg
If you change ..../sat/... to .../map/... in the URL, you'll get the Open Map Tile for that specific area.