Based on D7 Issue Request :

Mapbox provider plugin
https://www.drupal.org/node/2765131

Lets port this provider to D8 Version.
Who wants it? Can we have it?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chriscalip created an issue. See original summary.

chriscalip’s picture

A couple of things to consider.

1.) As of today, bringing this feature into play is not possible to go through proper channels. Here's why drupal.org/project/geocoder is currently dependent on https://github.com/geocoder-php/Geocoder 3.x but alas this library is feature frozen state for 3.x

2.) Putting in a provider for mapbox via proper channels will require to be added via https://github.com/geocoder-php/Geocoder 4.x but this module does not have the capacity to handle https://github.com/geocoder-php/Geocoder 4.x

3.) Well I tried adding in the provider inside the module.. the time to do this is getting long.. so I am cutting my losses.

a.) Reference Geocoder 3.x https://github.com/geocoder-php/Geocoder

As of January 2017, version 3.x is in a feature frozen state. All new features should be contributed to version 4.0 and upper. Last version is: 3.3.2.
Major version 3 will reach end of life on October 2017.

itamair’s picture

D8 Geocoder module is inheriting providers from geocoder-php library, that actually don't support Mapbox provider in any of its versions, right?
The hardcoded embedding of a Mapbox plugin directly into the D8 Geocoder module would be a forcing.
I don't see easy and coherent solutions here.

chriscalip’s picture

@itamair

Currently geocoder-php 4.x has a WIP for mapbox provider.
https://github.com/geocoder-php/Geocoder/issues/831

Looks like easiest way to deal with this issue is wait for geocoder 8.3.x and geocoder-php 4.x to have mapbox provider.

Will monitor situation and push this issue through once dependent issues are in play.

chriscalip’s picture

I understand some folks need php 5.6 which rules out geocoder-php 4.x and geocoder 8.3.x I tried doing a provider inside modules/geocoder but came into lots of blocks.

As I understand plugin arguments "settings" e.g apikeys are only doable if there is a corresponding provider. I know plugin/provider/Random has no settings form.

itamair’s picture

Yes ... ok, keeping in mind that in this issue: https://www.drupal.org/project/geocoder/issues/2825360
some extended work has been already drafted (and probably more than drafted) to push the Geocoder upgrade to v4.0 of willdurand/geocoder library

itamair’s picture

itamair’s picture

PHP 5.6 is still supported by Drupal 8 core (even 5.5), and should then be supported by its contrib modules ...

brooke_heaton’s picture

I don't think folks will be using php 5.6 for more than a few more months. I'm not optimistic about that solution :/

legovaer’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Active » Needs review
FileSize
1.87 KB

This patch adds a plugin placeholder to the module so that a user can install the mapbox plugin itself according to the documentation.

legovaer’s picture

FileSize
1.59 KB

There was a mistake in the patch in #10.

itamair’s picture

FileSize
2.06 KB

thanks @legovaer ... I tested and it works nicely.
I just made a little add-on to your patch to also list the geocoder-php/mapbox-provider also into the composer.json require-devs modules, with the others. Going to commit into 3.x dev ... and close this as fixed.

  • itamair committed c71a0ac on 8.x-3.x authored by legovaer
    Issue #2833772 by legovaer, itamair: D8 Mapbox provider plugin
    
itamair’s picture

Status: Needs review » Fixed
itamair’s picture

Status: Fixed » Closed (fixed)

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