How to get Drupal Geolocation 8.x.3.2 to show a map with pins from a view

283 views Asked by At

The website (Drupal 8) needs to show a view of content records with the addresses pinned to a map of NYS. The module I used before was version 8.x.1.1 and the new one (^3.2) is vastly different.

I have used Composer to install Geocoder, Geolocation, and Geofield - but I cannot find any documentation on how to make the configuration/s work together.

I have created a content type with an Address field and a Geolocation field. I have the view/s (one block to list the records which works fine, and one block to show the map). Preferred map type is Google.

So I have 4 main issues: 1) What configuration settings should I be using for Google maps, 2) The map block needs to have the center lat/long set (I cannot find where to set it), 3) needs to be restricted to show NYS, and 4) needs to show pins for the content records in the list block.

Help Please!

1

There are 1 answers

0
Sharklalu On

On your geofield field configuration you've to set a provider as googlemaps (you've to set an api key). In this same configuration, you have to define that your address field populate your lat/long values. For the pins, set the view mode of your geofield to leaflet for exemple. (follow the module's instructions).