Hi,

Awesome work guys.

Something to note:

After updating to 7.x-2.0-beta5, all the mapbox maps seem to be displaying incorrectly. all the x and y image file coordinates seem to be off.

Testing with zoom level 2:

The map tiles start at 0,0 to 4,4 at http://a.tiles.mapbox.com, but the module is generating mapbox map tiles -2,-2 to 2,2

Thanks in advance.

Comments

augustus.kling’s picture

Status: Active » Postponed (maintainer needs more info)

I'm unable to reproduce a problem with misaligned tiles. Can you please attach your map configuration and the layer configurations in use?

skchan2’s picture

StatusFileSize
new794.24 KB
new693.14 KB

I attached two images, one for the openlayers settings and one for the mapbox layers setting.

I also have this issue:

"Not suggested compatible version. Though you are very welcome to use whatever version of the OpenLayers library you want, it is suggested that you use version 2.12. You are currently not using that version or we are unable to determine which version you are using. Update your library settings at OpenLayers settings."

Even though the external library is pointing to the correct 2.12 version.

Thanks for your help.

augustus.kling’s picture

I'm sorry but this layer configuration works perfectly for me.

skchan2’s picture

StatusFileSize
new424.42 KB
new628.66 KB

weird, other maps work, only the mapbox maps have an issue with being misaligned.

tried changing the layer to be xyz and using the following base urls:

//a.tiles.mapbox.com/v1/mapbox.world-black/${z}/${x}/${y}.png
//b.tiles.mapbox.com/v1/mapbox.world-black/${z}/${x}/${y}.png
//c.tiles.mapbox.com/v1/mapbox.world-black/${z}/${x}/${y}.png
//d.tiles.mapbox.com/v1/mapbox.world-black/${z}/${x}/${y}.png

The map tiles shows but is still off on the Y axis

skchan2’s picture

StatusFileSize
new194.53 KB

tried removing the module files, clearing cache and reinstalling, but all the mapbox baselayers are still not showing correctly.

it did seem to fix the issue with detecting the 2.12 release

skchan2’s picture

Status: Postponed (maintainer needs more info) » Active

Anyone have any idea whats going on?

pol’s picture

I just tried with a custom mapbox map, it works pretty good.

Could you export the settings of your layer ?

Thanks

skchan2’s picture

This is what exported for MapBox World Black

$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_world_black';
$openlayers_layers->title = 'MapBox World Black';
$openlayers_layers->description = 'MapBox World Black';
$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' => 'world-black',
  'layer_type' => 'openlayers_layer_type_tms',
  '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,
  ),
  'projection' => array(
    0 => 'EPSG:3857',
  ),
);
pol’s picture

Do you still have the old Mapbox module enabled ?

skchan2’s picture

no, i disabled the module cause it was causing an error starting with beta4.

i disabled and removed the mapbox module.

pol’s picture

Before going further, could you try to test your mapbox layer on simplytest.me ?

Choose OpenLayers, the right version, then it will provide a Drupal Sandbox for 30 minutes.

Try to create your map, with your mapbox layer and see if it makes also an error.

skchan2’s picture

i get this when i try to edit a map

Exception: Projection 900913 lacks an authority code. Read http://drupal.org/node/1944074 for hints. in openlayers_get_projection_by_identifier() (line 996 of /home/s4bf8be4935233c1/www/sites/default/modules/openlayers/openlayers.module).

pol’s picture

Status: Active » Fixed

Please, take the time to read: #1331410: Better Handling of Projections.

skchan2’s picture

StatusFileSize
new455.67 KB

thanks for your help, i think i fixed it.

had to disable module --> uninstall --> clear cache --> reinstall

the mapbox maps seem to work now (although it still seems to pull broken image tiles but since i lock the map, the broken image tiles don't bother me)

attached is a screenshot

Status: Fixed » Closed (fixed)

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