Displaying maps within other content

Once you have configured a map in Cartaro you surely want to display it in appropriately. You could use the Frontmap module if your site is very map-centric but integrating maps within other content is often preferable.

Comparison of Mapping modules

This page aims to provide developers and site builders some navigation on the sea of options for the mapping of location data sets in Drupal D7. This is by no means an extensive survey. The idea is that by listing a number of the most popular modules side by side with their features, it will make it easier for the reader to shortlist modules for their specific needs before examining details on the various project and documentation pages.

In general you'll need at least two modules to create maps from location data: one to provide a location data storage facility and one to render the locations as markers on a map.

Examples of location storage modules are: Location, Geofield and Geolocation field and Get Locations.

Additionally, while the table below indicates required location storage methods (such as "Geofield" for "Leaflets"), it is in fact possible to deploy a module such as Geocoder to, for example, use Location as a storage method for Leaflet or OpenLayers.

Leaflet

The Drupal 7 Leaflet module provides integration with Leaflet, the modern open-source JavaScript library for mobile-friendly interactive maps.

Leaflet currently offers:

  • Field formatter that can show a map for fields that contain geospatial data
  • Views integration that plots data on a map (using the sub module Leaflet Views)
  • API for displaying data on a map

Leaflet extension modules

  • Leaflet Markercluster - Provides Beautiful Animated Marker Clustering functionality for Leaflet using the Leaflet MarkerCluster library.
  • Leaflet Widget for Geofield - a Geofield widget that uses the Leaflet widget plugin for adding and removing geometries.
  • Leaflet More Maps - adds over 20 attractive map styles such as MapBox, Stamen, Thunderforest and Esri.
  • Leaflet MapBox - use your own MapBox map tiles in your map views.

Adding more Mapbox tilesets Tutorial

MapBox layer provides some baselayers, but you can add additional Mapbox layers (or Tilesets) into Openlayers yourself.
Thanks to DjebbZ for the original tutorial for D6.

Required modules

Instructions

Choose a Tile Set

  1. First, head to http://tiles.mapbox.com/mapbox in the official MapBox website.
  2. Choose the tileset you want to use. In this example we will assume that you want to use the World Blue tileset, but the following applies for every tileset. Note the layer name: it is the last part of the url. For the World Blue tileset, it is world-blue.
  3. In the right part of the page, note the information you'll need in OpenLayers : the Zoom info, specified as a range. For the World Blue tileset the zoom levels are 0-8. Some tilesets may hold a file extension but if none is specified, use png).

Create a Layer

Now go back to your Drupal installation.

  1. Go to admin/structure/openlayers/layers/add for Drupal 7 to add a new layer.
  2. In the list select MapBox.
  3. Then fill the form with the requested information:

Pages

Subscribe with RSS Subscribe to RSS - maps