Linux 软件免费装
Banner图

Basic Google Maps Placemarks

开发者 iandunn
更新时间 2017年5月26日 07:56
捐献地址: 去捐款
PHP版本: 3.1 及以上
WordPress版本: 4.8
版权: GPL2

标签

shortcode google maps map marker placemark geocode marker clustering

下载

1.0 1.1 1.1.1 1.1.2 1.1.3 1.10 1.10-rc1 1.10-rc2 1.10-rc3 1.10-rc4 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.10.6 1.10.7 1.2 1.2.1 1.3 1.3.1 1.3.2 1.4 1.5 1.5.1 1.6 1.6.1 1.7 1.7-rc1 1.8 1.8-alpha1 1.8-rc1 1.9 1.9-alpha1 1.9-rc1 1.9.1 1.9.2 1.9.3-rc1 1.9.3-rc2

详情介绍:

BGMP creates a custom post type for placemarks (markers) on a Google Map. The map is embedded into pages or posts using a shortcode, and there are settings to affect how it's displayed. You can create markers that will show up on the map, and set their icons using the Featured Image meta box. When a marker is clicked on, a box will appear and show the marker's title and description. Features Live Examples Support I'm happy to fix reproducible bugs, but don't have time to help you customize the plugin to fit your needs. There's also plenty of documentation and community support available. Check out the 'How can I get help when I'm having a problem?' question in the FAQ for details.

安装:

For help installing this (or any other) WordPress plugin, please read the Managing Plugins article on the Codex. Basic Usage:
  1. After activating the plugin, go to the 'Basic Google Maps Placemarks' page under the Settings menu. Enter the address that the map should be centered on.
  2. Create a page or post where you'd like to embed the map, and type [bgmp-map] in the content area.
  3. Go to the Placemarks menu and click 'Add New'. Enter the title, address, etc.
  4. Click on 'Set Featured Image' to upload the icon.
  5. Click on the 'Publish' or 'Update' button to save the placemark.
Advanced Usage: Multiple maps with different locations, zoom levels, etc:
  1. Just add the extra parameters to the [bgmp-map] shortcode. Here's an example of the different ones you can use:
[bgmp-map categories="parks,restaurants" width="500" height="500"] [bgmp-map placemark="105" center="chicago" zoom="10" type="terrain"]
Multiple maps with different placemarks:
  1. Go to the Placemarks menu and click on Categories, and add a category for each set of placemarks.
  2. Edit your placemarks and click on the category you want to assign them to.
  3. Edit the place where the map is embedded and add the category parameter to the shortcode. For example: [bgmp-map categories="restaurants,record-stores"] or [bgmp-map categories="parks"]. Use the category's slug, which is displayed on the Categories page in step 1. Separate each slug with a comma.
  4. You can add the [bgmp-map] shortcode to multiple pages, each time using a different set of categories.
Setting the stacking order of overlapping markers:
  1. Choose which placemark you want to appear on top and edit it.
  2. Enter a number in the Stacking Order meta box in the right column that is greater than the other placemark's stacking order.
Adding a text-based list of placemarks to a page:
  1. Edit the post or page you want the list to appear on.
  2. Type [bgmp-list] in the context area.
  3. Click the 'Publish' or 'Update' button.
  4. (optional) You can specifiy a specific category or categories to pull from. e.g., [bgmp-list categories="record-stores,parks"]
  5. (optional) You can add "View on Map" links to each item in the list, which will open the corresponding marker's info window. e.g., [bgmp-list viewonmap="true"]
Using [bgmp-map] in a template file with do_shortcode(): For efficiency, the plugin only loads the required JavaScript, CSS and markup files on pages where it detects the map shortcode is being called. It's not practical to detect when do_shortcode() is used in a template, so you need to manually let the plugin know to load the files by adding this code to your theme: ` function bgmpShortcodeCalled() { global $post; $shortcodePageSlugs = array( 'hello-world', 'second-page-slug' ); if( $post ) if( in_array( $post->post_name, $shortcodePageSlugs ) ) add_filter( 'bgmp_map-shortcode-called', '__return_true' ); } add_action( 'wp', 'bgmpShortcodeCalled' ); ` Copy and paste that into your theme's functions.php file or a functionality plugin, update the function names and filter arguments, and then add the slugs of any pages/posts containing the map to $shortcodePageSlugs. That won't work for the home page, though. If you want to target the home page, or any other pages with conditional tags, you can do it like this: ` function bgmpShortcodeCalled() { global $post; if( ( function_exists( 'is_front_page' ) && is_front_page() ) || ( function_exists( 'is_home_page' ) && is_home_page() ) ) add_filter( 'bgmp_map-shortcode-called', '__return_true' ); } add_action( 'wp', 'bgmpShortcodeCalled' ); Before version 1.9, you needed to use thebgmp_map-shortcode-argumentsfilter to pass shortcode arguments when callingdo_shortcode()from a template, but that is no longer necessary. You can simply pass the arguments in thedo_shortcode()` call, like this: do_shortcode( '[bgmp-map center="Boston" zoom="5"]' ); Check the FAQ and support forum if you have any questions.

屏幕截图:

  • Custom marker icons on the map and a text list of markers below the map
  • Marker clusterings and custom map icons
  • The Placemarks page, where you can add/edit/delete map markers.
  • A example placemark.
  • The Categories screen.
  • The map settings.

升级注意事项:

1.10.7 BGMP 1.10.7 allows you to enter a Google Maps API key, which is sometimes necessary for the map to work. 1.10.6 BGMP 1.10.6 fixes a bug where marker-clustering images were missing. 1.10.5 BGMP 1.10.5 prepares the plugin to support language packs from WordPress.org. 1.10.4 BGMP 1.10.4 adds new translations for Russian, Dutch and Serbo-Croatian. 1.10.3 BGMP 1.10.3 includes a fix for a minor security vulnerability that would allow Administrators to inject malicious scripts into form fields. Since the vulnerability requires an Administrator account in order to exploit it, it is unlikely to be a realistic attack vector, but just to be safe I still strongly recommend that all users upgrade to this version. 1.10.2 BGMP 1.10.2 adds a Spanish translation. 1.10.1 BGMP 1.10.1 fixes a JavaScript bug and adds an Italian translation. 1.10 BGMP 1.10 adds some new shortcode options, fixes a few bugs, adds more hooks for developers and adds a German translation. 1.9.2 BGMP 1.9.2 fixes a bug where a [bgmp-map] shortcode category error would incorrectly be displayed in the Admin Panel. 1.9.1 BGMP 1.9.1 fixes a bug where [bgmp-map] shortcode categories passed as an array would issue a PHP warning. 1.9 BGMP 1.9 adds support for clustering large numbers of markers together. 1.8 BGMP 1.8 is internationalized and includes French and Chinese localizations. 1.7 BGMP 1.7 adds support for category, map center, zoom level and other parameters in the [bgmp-map] and [bgmp-list] shortcodes. 1.6.1 BGMP 1.6.1 makes it easier to use coordinates for a placemark location instead of an address. 1.6 BGMP 1.6 adds options to change the map type and fixes several minor bugs. 1.5.1 BGMP 1.5.1 increases the WordPress version requirement to 3.1. 1.5 BGMP 1.5 adds support for categorizing placemarks and creating maps on different pages that display different categories. 1.4 BGMP 1.4 adds the ability to set a stacking order for placemarks that overlap, and fixes several minor bugs. 1.3.2 BGMP 1.3.2 sorts the markers in the [bgmp-list] shortcode alphabetically, and prevents the information window scrollbar bug in more cases. 1.3.1 BGMP 1.3.1 fixes a bug where standard posts and pages would lose the 'Set Featured Image' meta box. 1.3 BGMP 1.3 loads the map/placemarks faster and contains several bug fixes. 1.2.1 BGMP 1.2.1 fixes a bug related to the marker's info window width and height. 1.2 BGMP 1.2 adds support for WordPress MultiSite and fixes several minor bugs. 1.1.3 BGMP 1.1.3 contains bug fixes, performance improvements and updates for WordPress 3.2 compatibility. 1.1.2 BGMP 1.1.2 just has some minor changes on the back end and a bug fix, so if you're not having problems then there's really no reason to upgrade, other than getting rid of the annoying upgrade notice. 1.1.1 BGMP 1.1.1 only loads the JavaScript files when needed, making the rest of the pages load faster, and also fixes a minor bugs related to HTTPS pages. 1.1 BGMP 1.1 will automatically geocode addresses for you, so you no longer have to manually lookup marker coordinates. After uploading the new files, deactivate and reactivate the plugin to populate the new address field on each Placemark based on the existing coordinates. 1.0 Initial release.

其他记录:

Localizations If there isn't a translation for your language (or it is incomplete/inaccurate) please consider making one and contributing it to the plugin. You can learn how by reading Translating WordPress and How to Create a .po Language Translation. The .pot file you'll need is inside the languages directory in the plugin's folder. Once you're done, just start a thread on the support forum with links to the .po and .mo files, and I'll add them to the next release. You can also subscribe to the BGMP Translators e-mail list to be notified when updated versions have new strings to translate. Known conflicts How you can help with the plugin's development Donations I do this as a way to give back to the WordPress community, so I don't want to take any donations. If you'd like to give something, though, I'd encourage you to make a donation to Doctors Without Borders or the WordPress Foundation. Customization If you need to customize BGMP and a solution isn't already available in the forums, the best thing to do is to hire a developer. Your local WordPress Meetup is a great place to meet one, or you can also check out jobs.wordpress.net. If you make customizations that could be beneficial to other users, please start a thread on the support forum with a description of them and a link to the source code.

更新日志:

v1.10.7 (8/19/2016) v1.10.6 (5/16/2016) v1.10.5 (10/1/2015) v1.10.4 (5/1/2015) v1.10.3 (4/23/2014) v1.10.2 (1/8/2014) v1.10.1 (11/25/2013) v1.10 (3/30/2013)