Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The best option for this is to use the zoomtolayer option. In some cases, you don't want to add point data or a bounding box directly to nodes (especially if many nodes will be in the same position). The Geo Taxonomy module offers the ability to attach geographical data to taxonomy terms. Specifically you can attach a bounding box to a term; bounding boxes are best if the things you are zooming to are not of uniform size such as countries which vary tremendously.
- Simply create a new term in Geo Taxonomy, and there is an intuitive form to enter the center point and bounding box.
- Create a new OpenLayers Data view with the nodes or taxonomy you want to display. Select Other: Bounding Box as the Data Source in the OpenLayers Data Overlay style plugin. The Geo Taxonomy module provides fields that match up with the top / left / right / bottom values that are required.
- Add this new layer to your preset, and make sure to choose the Invisible style for it, so that you don't have a big orange box around the desired country.
- Then add the Zoom To Layer behavior to your preset, and select that Data Overlay as the layer to zoom to.