Linux 软件免费装
Banner图

Waymorphic Map & Custom Maps

开发者 jamesb7
更新时间 2026年12月4日 01:37
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

location map maps openstreetmap maplibre

下载

1.2.2

详情介绍:

Waymorphic Map adds interactive maps to your posts and pages. The maps are vector maps of the whole planet, made from OpenStreetMap data and served by Waymorphic Map. They are free. You do not need an account, an API key or a payment card. This is the official plugin of Waymorphic Map. The author of the plugin operates the map service. The shortcode A map with one marker: [waymorphic_map lat="51.5074" lng="-0.1276" zoom="11" label="London"] A map from an address: [waymorphic_map address="10 Downing Street, London" zoom="16" style="bright"] A map with many markers. Without lat and lng, the view fits the markers: [waymorphic_map height="500"] [waymorphic_marker lat="48.8584" lng="2.2945"]<strong>Eiffel Tower</strong>[/waymorphic_marker] [waymorphic_marker lat="48.8606" lng="2.3376" open="true"]The Louvre[/waymorphic_marker] [waymorphic_marker address="Cathédrale Notre-Dame de Paris"]Notre-Dame[/waymorphic_marker] [/waymorphic_map] Attributes of [waymorphic_map]: Attributes of [waymorphic_marker]: lat and lng, or address; open="true" shows the popup when the page opens. The text between the tags is the popup. Optional: title (the name in the list and the first line of the popup), category, colour (such as #d63638), icon (the URL of a picture to use as the marker) and animation (drop or bounce). A marker with no popup text can have a slash at the end and no closing tag: [waymorphic_marker lat="51.5" lng="-0.12" /]. Use straight quotes (") in the shortcodes. A user who can edit the page sees a message below the map when an address was not found, when a position is not valid, or when the search found an address very far from the places of the map that have a lat and a lng (the map must have two such places, or a centre with a lat and a lng). Visitors do not see this message. The search gives the place that it knows best: write the town in an address, and the area or the full name of the country when other towns have the same name (address="Buckingham Palace, London", address="Boston, Lincolnshire"). Write United Kingdom and United States, not UK and USA. In a very large country, a correct town can be that far: with the full name of its area or of its country in the address (address="Perth, Western Australia"), it gets no message. Shapes Put the shape shortcodes in [waymorphic_map]. The points are latitude,longitude pairs with ; between them. The text between the tags is the popup of the shape. [waymorphic_map] [waymorphic_polygon points="51.50,-0.20; 51.55,-0.12; 51.50,-0.05" colour="#008a20"]The area we deliver to[/waymorphic_polygon] [waymorphic_line points="51.50,-0.20; 51.52,-0.10; 51.51,0.00" colour="#d63638" width="4"] [waymorphic_circle lat="51.5074" lng="-0.1276" radius="500"] [waymorphic_rectangle points="51.48,-0.20; 51.49,-0.15"] [/waymorphic_map] Files [waymorphic_map cluster="true" list="true"] [waymorphic_file url="https://example.com/wp-content/uploads/shops.csv" category="Shops" colour="#008a20"] [waymorphic_file url="https://example.com/wp-content/uploads/walk.gpx"] [/waymorphic_map] [waymorphic_file] shows the markers, lines and areas of a CSV, GeoJSON, KML or GPX file. The browser of the visitor gets the file each time the page opens, so a change to the file shows on the map. Ten files for each map at most. In the block, "Import a file" in the Markers panel reads a file from your computer and adds its markers and shapes to the block. The file is not uploaded. A block can have 1000 markers. One file gives 100 shapes at most, and a line keeps 500 points. A store locator [waymorphic_map locator="true" list="true" filter="true" directions="true" unit="mi" radius="10"] [waymorphic_marker address="10 Downing Street, London" title="London shop" category="Shops"]Open 9 to 5[/waymorphic_marker] [waymorphic_marker lat="53.4808" lng="-2.2426" title="Manchester depot" category="Depots"] [/waymorphic_map] External service This plugin shows maps from the Waymorphic Map tile server, https://tiles.waymorphic.com. The author of this plugin operates this server. The directions link (directions) is a link to the map service that you select in the settings, on the shortcode or in the block: The plugin sends nothing to these sites. The visitor goes there only with a click on the link, and the link has the position of the marker. The waymorphic_map_directions_services filter changes the list of the services. The terms of use of the service are its fair use rules. The same rules have the privacy statement of the service ("No tracking"): the server has no accounts, no cookies and no analytics, and it keeps the usual access logs for a short time to operate the service. The service is free and best effort: there is no uptime guarantee. If you run your own Waymorphic Map server, you can set its URL in Settings > Waymorphic Map. Map data © OpenStreetMap contributors, with the OpenMapTiles schema. The credit in the corner of each map is a licence requirement. Do not remove it.

安装:

Install the plugin From the plugin directory:
  1. In the administration of your site, go to Plugins > Add New Plugin.
  2. Search for "Waymorphic Map".
  3. Select "Install Now", then "Activate".
From a zip file:
  1. Go to Plugins > Add New Plugin > Upload Plugin.
  2. Select the zip file of the plugin, then "Install Now".
  3. Select "Activate Plugin".
The plugin has no account, no API key and no setup: you can add a map immediately. Your first map with the block
  1. Open a post or a page in the editor and add the "Waymorphic Map" block.
  2. The block asks "Where is your map?". Type an address, a town or a postcode, then select the place from the list. The map goes there and gets a marker.
  3. Click the marker and write its popup text. To add a marker, click the map at the point, then select "Add a marker here". To move a marker, drag it.
  4. In the sidebar of the block, the "Map" panel has the five map styles and the height. The "Features" panel has the list of the markers, the search for the nearest markers, the category buttons and the directions link.
  5. Save the page.
Your first map with the shortcode
  1. Add a "Shortcode" block to a post or a page. The shortcode also operates in the classic editor, in a widget and in a template.
  2. Write the shortcode, for example [waymorphic_map address="10 Downing Street, London" zoom="16"].
  3. Save the page. The section "The shortcode" of the description gives all the attributes.
Your first store locator
  1. Add a map with a marker for each of your places. The first line of the popup text of a marker is its name in the list. Give each marker a category if you have different types of places.
  2. In the "Features" panel of the block, set "List of the markers below the map", "Search for the nearest markers", "Category buttons" and "Directions link" to on. On the shortcode, these are list="true", locator="true", filter="true" and directions="true".
  3. Save the page. Visitors type an address, or use their location, and see the nearest places with the distances.
The settings Settings > Waymorphic Map has the defaults for new maps: the style, the height, the zoom, and the map service of the directions link.

屏幕截图:

  • A store locator: the visitor searches for a place, selects a category, and sees the nearest places in the list with their distances.
  • The directions link: the visitor selects Google Maps, Apple Maps, Waze or OpenStreetMap.
  • Shapes on the Bright style: an area, a line for a route, and a circle.
  • Markers with a colour for each category, on the Dark style.
  • A new block asks for the place. The search gives suggestions while you type.
  • The block in the editor: the search field on the map, the markers, and the fields of a marker in the sidebar.
  • The settings page with the defaults for new maps.

升级注意事项:

1.2.2 Changes in the code for the plugin directory of WordPress. The maps and the settings do not change. If you installed version 1.1.0 or 1.2.0 from a zip file: activate this version, then deactivate the older version and delete it. 1.2.1 The plugin has a new name, and its folder is now waymorphic-map. If you installed version 1.1.0 or 1.2.0 from a zip file: activate this version, then deactivate the older version and delete it. The settings and the maps stay.

常见问题:

Is an API key necessary?

No. There is no account, no key and no quota.

Is it free for commercial sites?

Yes. Keep the credit on the map and use the service as a map. Bulk downloads of tiles are not permitted.

Can I change the colour of the map?

Select one of the five styles for each map, or set the default style in the settings.

Why does the map not zoom when I scroll?

This prevents the map from catching the scroll of the page. Hold ctrl (or cmd on a Mac) and scroll, or use the buttons. To change this, set "Scroll to zoom" on the block, or scroll_zoom="true" on the shortcode.

Can I make a store locator?

Yes. Set locator="true" and list="true" on the shortcode, or the same options in the "Features" panel of the block. Visitors type an address and see the nearest markers with their distances.

Which map service do the directions open?

You select it: Google Maps, Apple Maps, Waze or OpenStreetMap. Set the service for all maps in Settings > Waymorphic Map, or for one map with directions="google" on the shortcode or in the "Features" panel of the block. With directions="choice", the visitor sees the list of the services and selects one.

Can I change the colours of the list, the search and the buttons?

Yes. These parts keep their look in each theme: the usual CSS rules of a theme or of the site do not change them. To change them, set CSS variables in Appearance > Customize > Additional CSS, for example: .wp-block-waymorphic-map { --waymorphic-map-accent: #b32d2e; --waymorphic-map-radius: 0; --waymorphic-map-list-height: 480px; } The variables are --waymorphic-map-accent, --waymorphic-map-accent-text, --waymorphic-map-text, --waymorphic-map-muted, --waymorphic-map-surface, --waymorphic-map-border, --waymorphic-map-line, --waymorphic-map-radius, --waymorphic-map-font-size, --waymorphic-map-list-height, --waymorphic-map-scheme (light or dark: the parts that the browser draws, such as the scroll bar of the list, for a dark --waymorphic-map-surface), --waymorphic-map-popup-accent (the colour of the links in a popup; a popup is white on each site, so set this colour when the accent colour is light) and --waymorphic-map-scroll-space (the space above the map after a click on a row of the list, for a header that stays at the top of the window). For a change that the variables do not make, write !important in your CSS rule.

Can I draw shapes in the block editor?

Yes. Open the "Shapes" panel, select a type and click the map. For a heatmap, use the shortcode.

Can I show a route?

Yes, as a line. Import a GPX or KML file of the route, or draw a line. The plugin does not calculate a route between two addresses: the directions link opens a map service (Google Maps, Apple Maps, Waze or OpenStreetMap) for that.

Can I import my markers from a different map plugin?

Export the markers as a CSV file, make sure that the first row has lat and lng columns, then use "Import a file" in the block.

Can developers change the map?

Yes. The waymorphic_map_config filter changes the configuration of a map, waymorphic_map_tiles_url changes the tile server, and waymorphic_map_directions_services changes the map services of the directions link. The address that the waymorphic_map_directions_url filter gives must start with http or https. A map element that you write by hand (not with the block or the shortcode) starts only with a style from the tile server of the site: the waymorphic_map_trusted_addresses filter adds other addresses. A classic theme that makes a map in a template (with waymorphic_map_render() or do_shortcode()) must call wp_enqueue_style( 'waymorphic-map' ) in a function on wp_enqueue_scripts: without this, the styles of the map load after the map. In JavaScript, each map element has its MapLibre map in the waymorphicMap property.

How do I get help or report a problem?

Send an email to contact@waymorphic.com.

更新日志:

1.2.2 1.2.1 1.2.0 1.1.0 1.0.0