Linux 软件免费装
Banner图

EasyRegions – Store Locator Maps

开发者 tijmensmit
更新时间 2026年12月1日 18:15
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv3 or later
版权网址: 版权信息

标签

maps store locator interactive map world map us map

下载

1.0.0

详情介绍:

EasyRegions adds a clickable map of your stores to any page. It works with WP Store Locator: every store you add there appears on the map, with no extra setup.
👉 Try the live demo · Documentation
The map starts at the world, or at your country when all your stores are in one. Every country and state is shaded by how many stores it has. Click a country to see its states, and click a state to see its stores below the map, with their address and a link to the store page. What you get Built for every visitor Map data The maps are made from open data, simplified for the web. They are not the original files. Country flags: circle-flags by HatScripts (MIT), see assets/flags/LICENSE.md. Sample stores: names and addresses from Wikidata, public domain (CC0), see sample/LICENSE.txt. See data/1/2026.1/LICENSE-DATA.txt in the plugin folder, and license.txt for the licences of everything the plugin includes. Source code Nothing in the plugin is minified except the block's editor script, assets/dist/blocks/region-map/index.js. Its source is assets/src/blocks/region-map/index.js in the plugin folder; npm install and npm run build (see package.json) build it with @wordpress/scripts.

安装:

  1. Install and activate WP Store Locator, then this plugin.
  2. Your stores are tagged with their country and state by themselves, while you're in the dashboard or in the background. A notice says how many are left, and Store Locator › Region Maps shows the details.
  3. Add the Region Map block to a page, or the [wpsl_region_map] shortcode.

屏幕截图:

  • A country's states with their store counts, and a breadcrumb back to the world.
  • A state's stores as cards, with address, phone number and Directions and Website buttons.
  • A map can start at a continent, such as Europe.
  • The Region Map block, with its settings in the sidebar and a live preview.
  • The Status tab: where your stores are, and the shortcode for your map.
  • The settings: colors, map height and shading.
  • Region pages give every country and state its own address.
  • Sample stores to try the map before your own stores are in.

常见问题:

Which options does the shortcode have?

  • region="US" starts the map at a country, at a state such as US-CA, or at world. Without it, the map starts at the country of your stores, or at the world when they are in more than one.
  • region="europe" starts the map at a continent: europe, africa, asia, north-america, south-america or oceania. region="eu" shows the 27 countries of the European Union. The map shows only those countries and stays inside them. A country that lies on two continents, like Russia or Turkey, shows only the part on that continent, and counts the stores of its states on that side: Istanbul's stores are in Europe, Ankara's in Asia.
  • category="shops,outlets" shows only the stores in these store categories (their slugs).
  • empty="hide" hides the regions without stores, instead of showing them muted.
  • labels="hide" leaves the store counts off the regions. By default each region with stores shows its count: on a country's map a small state gets a smaller number, while on a continent map a country too small for its number shows it on hover and focus. The world map shows no counts, as only its largest countries would have room for one. Without the attribute the map follows the "Store counts on the map" setting.
  • height="400" caps this map's height in pixels, from 200 to 1200; a wide map gets narrower to stay within it. Without it the map follows the "Maximum height of the map" setting.
  • flags="hide" leaves out the country flags before the country names in the lists, the breadcrumb and the heading. Without it the map follows the "Country flags" setting.
  • shading="gradient" gives every store count its own shade, from the lightest to the region color, instead of five steps. Without it the map follows the Shading setting.
  • template="simple" shows each store with its name, address and a link. The default, detailed, adds the phone number, email address and Directions and Website buttons.
  • icons="false" leaves out the icons in the detailed cards. Without it they follow "Use icons?" in WP Store Locator's Appearance settings; icons="true" always shows them.
The block has the same options in its sidebar.

Can every country and state have its own address?

Yes. Tick "Create region pages?" under Store Locator › Region Maps › Settings › Region pages, and pick the page with your map. Every level of that map then has a clean address below the page, such as /stores/australia/new-south-wales/, with the region's name in the page title, its own canonical link (also with Yoast SEO and Rank Math), and a place in WordPress's sitemap. A map that starts at one country starts its addresses at the state: /us-stores/california/. Old links with ?wpsl_region= move to the new address. It needs pretty permalinks; maps on other pages keep their ?wpsl_region= links.

Can I put two maps on one page?

Yes. Each map keeps its own level, also in the URL.

A store is not on the map. Why?

Store Locator › Region Maps lists every store without a region and why: it has no coordinates, or its coordinates are outside every country. Fix the coordinates in the store's settings and it is tagged again by itself.

How do I change the colors?

Under Store Locator › Region Maps › Settings. Themes can also set --wpsl-region-1 to --wpsl-region-5, --wpsl-region-empty, --wpsl-region-active and --wpsl-region-active-border on .wpsl-region-map.

Can the map be wider or narrower?

Yes, under Store Locator › Region Maps › Settings: the map is at most 600 px tall by default, centred above the stores. It keeps its shape, so lowering the height makes a wide map narrower too, and a tall map like Chile gets a narrow box. Otherwise it is as wide as the page's content column. Themes can change the height with --wpsl-region-map-height and cap the width with --wpsl-region-map-width, for example .wpsl-region-map { --wpsl-region-map-width: 640px; }.

My theme prints the map from a template, and it has no colors.

The plugin loads its stylesheet in the page head when the page's content has the block or the shortcode. A map printed by a theme template, a page builder or a widget loads it later, and some plugins drop late stylesheets. Tell the plugin which pages have a map: add_filter( 'wpsl_region_maps_needs_assets', function ( $needed ) { return $needed || is_page( 'stores' ); } );

Can I see the map before my own stores are in?

Yes. Under Store Locator › Region Maps › Settings › Sample data, add 500 museums, libraries, theatres and universities on every continent, with categories, phone numbers and opening hours. Their names and addresses are real, from Wikidata; the phone numbers and opening hours are made up. The same screen removes exactly these again, and uninstalling the plugin removes them too. A sample store you give another name or address becomes your own store and stays.

更新日志:

1.0.0