Comments

richard moger’s picture

Not a full solution but got me out of the poo.

If you browse to your mapbox url (the one on the mapbox config page), you can then paste the json returned into the text box and save config way. You just need to remove the Grid wrapper so that it starts and ends with curly braces.

Hope this helps.

Rich

pol’s picture

Status: Active » Needs review
StatusFileSize
new1.86 KB

Here's the patch for 7.x-2.x.

cesareaugusto’s picture

When will the patch be merged into at least the 7.x dev release?

pol’s picture

Title: OpenLayers 7.x-2.x-dev breaks with MapBox... still looking for a proper solution » OpenLayers 7.x-2.x-dev breaks with MapBox.

I don't know... I hope asap, I never had any news since September.

pol’s picture

Updated patch.

cesareaugusto’s picture

StatusFileSize
new39.28 KB

I applied the #5 patch to the latest (today) dev, but still got the same broken image links error. Here's a screenshot.

pol’s picture

That's weird ! I'll test it tonight.

cesareaugusto’s picture

Thank you very much Pol! Tell me if you need any more information to reproduce it!

pol’s picture

New patch, one line was missing, sorry !

cesareaugusto’s picture

Again the very same error. The #9 patch didn't solve it. :(

pol’s picture

Delete and recreate the layer, it should work.

cesareaugusto’s picture

I disabled the module, uninstalled, then re-enabled it. But I still got the very same error. How should I delete and recreate it?

pol’s picture

Could you make sure that the table openlayers_layers is empty ?

pol’s picture

Status: Needs review » Fixed

I've added support for MapBox layers in OpenLayers, this module is now obsolete.

http://drupalcode.org/project/openlayers.git/commit/7cc56a8

cesareaugusto’s picture

I just upgraded and tested the latest OL dev (the today jan 27th one). I can see MapBox layers but the broken URL issue is still here.

pol’s picture

Dude,

I tested it, again and again and I have not any single problem, everything works.
Could you please send screenshots and or more explanations on how you do ?

Thanks.

cesareaugusto’s picture

I tested it, again and again and I have not any single problem, everything works.
Could you please send screenshots and or more explanations on how you do ?

I tried whatever I could immagine. But nothing. The error is still here. I tried to delete and recreate the map. Creat a new different map from scratch. But nothing. Mapbox layers seem not to work!

Attached a picture of the preview of one of my maps. I got broken url images error.

I don't know whether this information may help, but I am experiencing a similar problem with whatever layer but Google ones. When trying to enable Bing or Yahoo maps I got a blank map, no broken images url errors but a completely blank map. It seems that only Google Maps layers work.

I am using the latest dev (today) and constantly upgrade.

If you need any more information just tell me.

pol’s picture

Hello,

I've integrated mapbox maps into OpenLayers, you do not need this module anymore.
Don't forget to delete the module files before using it in OpenLayers !

Happy mapping.

cesareaugusto’s picture

StatusFileSize
new24.54 KB

I've integrated mapbox maps into OpenLayers, you do not need this module anymore.
Don't forget to delete the module files before using it in OpenLayers !

I know it is merged into OpenLayers itself. I turned off the MapBox module. Then completely uninstalled it from the DB. Last I deleted the MapBox module folder.

I attached the picture of the errore (I forgot to do it in my previous post)

pol’s picture

I'm sorry, then I don't know, I'm not able to reproduce the problem.

cesareaugusto’s picture

@Pol: Which info should I look for to reproduce? I got a similar problem with all the other layers but Google. Whatever layer I choose it displays a blank map. Only Google Maps works.

cesareaugusto’s picture

Below the code generated when exporting e.g. the MapBox Streets layer, perhaps it may help to understand the problem.

$openlayers_layers = new stdClass();
$openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
$openlayers_layers->api_version = 1;
$openlayers_layers->name = 'mapbox_streets';
$openlayers_layers->title = 'MapBox Streets';
$openlayers_layers->description = 'MapBox Streets';
$openlayers_layers->data = array(
  'url' => array(
    0 => 'http://a.tiles.mapbox.com/',
    1 => 'http://b.tiles.mapbox.com/',
    2 => 'http://c.tiles.mapbox.com/',
    3 => 'http://d.tiles.mapbox.com/',
  ),
  'layername' => 'mapbox-streets',
  'layer_type' => 'openlayers_layer_type_mapbox',
  'osm' => FALSE,
  'isBaseLayer' => TRUE,
  'type' => 'png',
  'resolutions' => array(
    0 => 156543.0339,
    1 => 78271.51695,
    2 => 39135.758475,
    3 => 19567.8792375,
    4 => 9783.93961875,
    5 => 4891.96980938,
    6 => 2445.98490469,
    7 => 1222.99245234,
    8 => 611.496226172,
    9 => 305.748113086,
    10 => 152.874056543,
    11 => 76.4370282715,
    12 => 38.2185141357,
    13 => 19.1092570679,
    14 => 9.55462853394,
    15 => 4.77731426697,
    16 => 2.38865713348,
  ),
  'projection' => array(
    0 => '900913',
  ),
);
pol’s picture

Thanks for the export.

However, it looks like the mapbox-streets tiles are no more available at MapBox, see: http://tiles.mapbox.com/mapbox/map/mapbox-streets

Can you try with another Mapbox map ?

cesareaugusto’s picture

I tried the MapBox World * layers, the all seem to work (Bing and Yahoo still don't, though it's another topic). But the MapBox World maps only show countries borders. I need a map with streets on.

I cloned the MapBox Streets layer and modified it to DC Brite layername (as seen from http://tiles.mapbox.com/mapbox/). I got the very same error. Here's the exported code:

$openlayers_layers = new stdClass();
$openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
$openlayers_layers->api_version = 1;
$openlayers_layers->name = 'mapbox_dcbright';
$openlayers_layers->title = 'MapBox DC Bright';
$openlayers_layers->description = 'MapBox DC Bright';
$openlayers_layers->data = array(
  'url' => array(
    0 => 'http://a.tiles.mapbox.com/
',
    1 => 'http://b.tiles.mapbox.com/
',
    2 => 'http://c.tiles.mapbox.com/
',
    3 => 'http://d.tiles.mapbox.com/',
  ),
  'layername' => 'dc-bright',
  'osm' => 1,
  'type' => 'png',
  'resolutions' => array(
    0 => 156543.0339,
    1 => 78271.51695,
    2 => 39135.758475,
    3 => 19567.8792375,
    4 => 9783.93961875,
    5 => 4891.96980938,
    6 => 2445.98490469,
    7 => 1222.99245234,
    8 => 611.496226172,
    9 => 305.748113086,
    10 => 152.874056543,
    11 => 76.4370282715,
    12 => 38.2185141357,
    13 => 19.1092570679,
    14 => 9.55462853394,
    15 => 4.77731426697,
    16 => 2.38865713348,
  ),
  'projection' => array(
    0 => '900913',
  ),
  'isBaseLayer' => 1,
  'layer_type' => 'openlayers_layer_type_mapbox',
  'layer_handler' => 'MapBox',
  'serverResolutions' => array(
    0 => 156543.0339,
    1 => 78271.51695,
    2 => 39135.758475,
    3 => 19567.8792375,
    4 => 9783.93961875,
    5 => 4891.96980938,
    6 => 2445.98490469,
    7 => 1222.99245234,
    8 => 611.496226172,
    9 => 305.748113086,
    10 => 152.874056543,
    11 => 76.4370282715,
    12 => 38.2185141357,
    13 => 19.1092570679,
    14 => 9.55462853394,
    15 => 4.77731426697,
    16 => 2.38865713348,
    17 => 1.19432856674,
    18 => 0.597164283371,
    19 => 0.298582141697,
    20 => 0.149291070849,
    21 => 0.0746455354244,
  ),
  'maxExtent' => array(
    0 => -20037508,
    1 => -20037508,
    2 => 20037508,
    3 => 20037508,
  ),
  'base_url' => NULL,
  'transitionEffect' => 'resize',
  'weight' => 0,
);
pol’s picture

I've fixed a bug in the JS of MapBox and succeeded to display the DC-Bright map.

Could you retrieve the latest dev version and test please ?

Thanks a lot !

cesareaugusto’s picture

I'm trying to download the latest 7.x-2.x-dev from the projects page, but it dates 2013-Feb-02 (not today).

pol’s picture

Always use Git please.

cesareaugusto’s picture

Just tried it from Git. This is the tarball I used http://drupalcode.org/project/openlayers.git/snapshot/f3f8ab22cd1c2415655b24babe34c87fcf8b7d10.tar.gz

It still doesn't work.

pol’s picture

Again, I don't know how to help.
Is this online somewhere ?

This is my layer export:

 $openlayers_layers = new stdClass();
$openlayers_layers->disabled = FALSE; /* Edit this to true to make a default openlayers_layers disabled initially */
$openlayers_layers->api_version = 1;
$openlayers_layers->name = 'dc_bright';
$openlayers_layers->title = 'DC Bright';
$openlayers_layers->description = 'MapBox DC Bright';
$openlayers_layers->data = array(
  'url' => array(
    0 => 'http://a.tiles.mapbox.com/
',
    1 => 'http://b.tiles.mapbox.com/
',
    2 => 'http://c.tiles.mapbox.com/
',
    3 => 'http://d.tiles.mapbox.com/',
  ),
  'layername' => 'dc-bright',
  'osm' => 0,
  'type' => 'png',
  'resolutions' => array(
    0 => 152.87405654297,
    1 => 76.437028271484,
    2 => 38.218514135742,
    3 => 19.109257067871,
    4 => 9.5546285339355,
    5 => 4.7773142669678,
    6 => 2.3886571334839,
    7 => 1.1943285667419,
    8 => 0.59716428337097,
  ),
  'projection' => array(
    0 => '900913',
  ),
  'isBaseLayer' => 1,
  'layer_type' => 'openlayers_layer_type_mapbox',
  'layer_handler' => 'MapBox',
  'serverResolutions' => array(
    0 => 156543.0339,
    1 => 78271.51695,
    2 => 39135.758475,
    3 => 19567.8792375,
    4 => 9783.93961875,
    5 => 4891.969809375,
    6 => 2445.9849046875,
    7 => 1222.9924523438,
    8 => 611.49622617188,
    9 => 305.74811308594,
    10 => 152.87405654297,
    11 => 76.437028271484,
    12 => 38.218514135742,
    13 => 19.109257067871,
    14 => 9.5546285339355,
    15 => 4.7773142669678,
    16 => 2.3886571334839,
    17 => 1.1943285667419,
    18 => 0.59716428337097,
    19 => 0.29858214169741,
    20 => 0.1492910708487,
    21 => 0.074645535424352,
  ),
  'maxExtent' => array(
    0 => -20037508,
    1 => -20037508,
    2 => 20037508,
    3 => 20037508,
  ),
  'base_url' => NULL,
  'transitionEffect' => 'resize',
  'weight' => 0,
);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.