Get Started with Mapsemble + Drupal.

To use the Drupal with Mapsemble and retrieve your API credentials, you need to be logged in.
A Mapsemble Store Locator map with demo content.

Installation

  1. Run composer require drupal/mapsemble in your Drupal project or download from Drupal.org.
  2. Set the Oauth credentials in settings(.local).php:

$config['mapsemble.settings']['client_id'] = 'your-client-id'

$config['mapsemble.settings']['client_secret'] = 'your-client-secret';

  1. Run drush en mapsemble or use the UI.
  2. Create a Map on Mapsemble with the Drupal starterkit.
  3. Create a new entity type with a Geofield or add a geofield to an existing entity type.
  4. Go to /admin/structure/mapsemble and configure which view modes should be used for cards, popups and data.
To use the Drupal with Mapsemble and retrieve your API credentials, you need to be logged in.

Configuring Filters in mapsemble.

You can create filters in Mapsemble that are actually handled by Drupal.

You can also synchronize data with Mapsemble and use mapsemble for filtering.

First create

Creating filters

In Mapsemble

  1. Create a filter in mapsemble
  2. Set the handler to remote.
  3. Set the filter endpoint to: https://your-website.com/mapsemble/filter
  4. If there is an 'options' endpoint, use https://your-website.com/mapsemble/filter/options

In Drupal

  1. Create a Mapsemble Map.
  2. In the 'Filter by Drupal' section, select the configured Mapsemble Filters and map them to Drupal fields.

Syncing fields with Drupal

Sync Drupal fields with mapsemble and let Mapsemble handle the filtering.

You can also use data in Mapsemble to style markers depending on the content.

Example: Mapsemble "Store Locator"

Get a fully working example in a few minutes:

  1. Enable the Drupal submodule 'Mapsemble Store Locator Demo'. Previously make sure to add any dependency to your project.
  2. Go to /mapsemble-store-locator and follow the instructions.
To use the Drupal with Mapsemble and retrieve your API credentials, you need to be logged in.