Change map zoom level based on URL arguments

Created on 30 March 2009, about 16 years ago
Updated 16 May 2024, about 1 year ago

Is it possible to display different maps (in a view) based on the view arguments?

Example: I create a view with style GMap showing the locations of all nodes. I add the country name as an argument in the view so the URL would look something like: 'example.com/node_map/australia'. The map would be zoomed in on Australia (though you could still drag it around to view other countries/nodes). Changing the country name in the URL would change the initial zoomed-in area of the map.

To do this, I figure you'd have to use a GMap macro by changing the 'center' and 'zoom' values, but I don't know how to change these based on the argument, or how to specify the different values for different arguments/countries...
Ideas?

Feature request
Status

Closed: won't fix

Version

1.0

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024