[wordpress插件] Basic Google Maps Placemarks基本的Google Maps地标

wordpress 插件 文章 2020-02-29 16:20 1057 0 全屏看文

AI助手支持GPT4.0

评分
88
描述

BGMP creates a

BGMP创建一个

rel="nofollow">custom post type for placemarks (markers) on a Google Map.

rel =“ nofollow”>自定义帖子类型用于Google地图上的地标(标记)。

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

功能

    • Each map marker can have a unique custom Installation icon, share a common custom icon, or use the default icon.
    • 每个地图标记都可以具有唯一的自定义安装图标,共享通用的自定义图标或使用默认图标。

    • Options to set the map type (street, satellite, etc), center location, size, zoom level, navigation controls, etc.
    • 用于设置地图类型(街道,卫星等),中心位置,大小,缩放级别,导航控件等的选项。

    • Setup unique maps on different pages with their own placemarks, map types, center locations, etc.
    • 在不同页面上设置具有自己的地标,地图类型,中心位置等的独特地图。

    • Placemarks can be assigned to categories, and you can control which categories are displayed on a individual map.
    • 可以将地标分配给类别,您可以控制在单个地图上显示的类别。

    • Marker clustering for large numbers of placemarks
    • 大量地标的标记聚类

    • Extra shortcode to output a text-based list of markers for mobile devices, search engines, etc.
    • 额外的简码可为移动设备,搜索引擎等输出基于文本的标记列表。

    • Lots of filters so that developers can customize and extend the plugin.
    • 许多过滤器,以便开发人员可以自定义和扩展插件。

    • Use HTML, images, etc inside the information window.
    • 在信息窗口中使用HTML,图像等。

    • Compatible with WordPress MultiSite.
    • 与WordPress MultiSite兼容。

    • Internationalized (see Other Notes for a list of supported languages)

    • 已国际化(有关支持的语言列表,请参见其他说明

      li>

      li>

    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.

      常见问题解答以了解详情。

      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 翻译WordPress

        /how-to-create-a-po-language-translation" rel="nofollow">How to Create a .po Language Translation.

        / how-to-create-a-po-language-translation“ rel =” nofollow“>如何创建.po语言翻译。

        The .pot file you’ll need is inside the languages directory in the plugin’s folder.

        您需要的.pot文件位于插件文件夹的 languages 目录中。

        Once you're done, just start a thread on the support forum with links to the .po

        完成后,只需在支持论坛上启动主题,并带有指向.po的链接

        and .mo files, and I'll add them to the next release.

        和.mo文件,我将它们添加到下一个版本中。

        You can also subscribe to the BGMP Translators e-mail list to

        您还可以订阅 BGMP转换器电子邮件列表

        be notified when updated versions have new strings to translate.

        当更新的版本中包含要翻译的新字符串时,就会收到通知。

        Known conflicts

        已知冲突

          How you can help with the plugin’s development

          如何为插件的开发提供帮助

            • The thing I could really use some help with is answering questions on the support forum.

            • 我真正需要帮助的是在支持论坛上回答问题。

              I don’t have a lot of time to work on the plugin, so the time I spend answering questions reduces the amount of time I have to add new features.

              我没有太多时间来处理该插件,因此花在回答问题上的时间减少了我必须添加新功能的时间。

              If you’re familiar with the plugin and would like to help out, you can click the ‘Subscribe to Emails for this Plugin’ link to get an e-mail whenever a new post is created.

            • 如果您熟悉该插件并希望提供帮助,则可以在每次创建新帖子时单击“为此插件订阅电子邮件”链接以获取电子邮件。

            • Translate the plugin into your language.

            • 将插件翻译成您的语言。

              See the Localizations section above for details.

            • 有关详细信息,请参见上面的本地化部分。

            • Volunteer to test new versions before they’re officially released.

            • 自愿在新版本正式发布之前对其进行测试。

              Sign up for the BGMP Testers e-mail list to be notified

              注册 BGMP测试人员电子邮件列表,以便收到通知

              when new release candidates are available for testing.

            • 新候选版本可供测试时。

            • If you find a bug, create a post on the support forum with as much information

            • 如果发现错误,请在支持论坛上创建帖子,并提供尽可能多的信息

              as possible.

              尽可能。

              If you’re a developer, create a patch and include a link to it in the post.

            • 如果您是开发人员,请创建一个补丁并将其链接包括在帖子中。

            • Send me feedback on how easy or difficult the plugin is to use, and where you think things could be improved.

            • 向我发送有关插件使用的难易程度以及您认为可以改进的地方的反馈。

              Add a post to the support forum with details.

            • 支持论坛中添加详细信息。

            • Send me feedback on ways the documentation could be more clear or complete.

            • 向我发送有关文档可能更清晰或更完整的反馈。

              Add a post to the support forum with details.

            • 支持论坛中添加详细信息。

            • Review the code for security vulnerabilities and best practices.

            • 查看有关安全漏洞和最佳实践的代码。

              If you find a security issue, please contact me privately so that I can release a fix for it before publicly disclosing it.

              如果您发现安全问题,请与我联系私下联系,以便在公开发布该补丁之前,我可以发布该补丁。

            • Check the TODO.txt file for features that need to be added and submit a patch.
            • 检查TODO.txt文件中需要添加的功能并提交补丁。

            Donations

            捐赠

            I do this as a way to give back to the WordPress community, so I don’t want to take any donations.

            我这样做是为了回馈WordPress社区,所以我不想接受任何捐款。

            If you'd like to give something, though, I'd encourage you to make a donation to Doctors Without Borders or

            不过,如果您想提供帮助,建议您捐款给 Doctors Without Borders

            the WordPress Foundation.

            WordPress基础

            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.

            如果您需要自定义BGMP,并且论坛中尚未提供解决方案,那么最好的办法就是雇用一名开发人员。

            Your local WordPress Meetup is a great place to meet one, or you can also check out

            您当地的WordPress Meetup 是一个聚会的好地方,或者您也可以查看

            href="http://jobs.wordpress.net" rel="nofollow">jobs.wordpress.net.

            href =“ http://jobs.wordpress.net” rel =“ nofollow”> jobs.wordpress.net 。

            If you make customizations that could be beneficial to other users, please start a thread on the support forum<

            如果您进行的自定义可能对其他用户有利,请在支持论坛上启动主题<

            /a> with a description of them and a link to the source code.

            / a>以及它们的描述和源代码的链接。

安装步骤

For help installing this (or any other) WordPress plugin, please read the Managing Plugins article on the

有关安装此(或任何其他)WordPress插件的帮助,请阅读以下文章中的管理插件文章。

Codex.

法典。

Basic Usage:

基本用法:

    1. After activating the plugin, go to the ‘Basic Google Maps Placemarks’ page under the Settings menu.

    2. 激活插件后,转到“设置”菜单下的“基本Google Maps地标”页面。

      Enter the address that the map should be centered on.

    3. 输入地图应居中的地址。

    4. Create a page or post where you’d like to embed the map, and type [bgmp-map] in the content area.
    5. 在您想要嵌入地图的页面或帖子上创建一个页面,然后在内容区域中键入 [bgmp-map]

    6. Go to the Placemarks menu and click ‘Add New’.

    7. 转到“地标”菜单,然后单击“添加新”。

      Enter the title, address, etc.

    8. 输入标题,地址等。

    9. Click on ‘Set Featured Image’ to upload the icon.
    10. 点击“设置特色图片”以上传图标。

    11. Click on the ‘Publish’ or ‘Update’ button to save the placemark.
    12. 单击“发布”或“更新”按钮以保存地标。

    Advanced Usage:

    高级用法:

    Multiple maps with different locations, zoom levels, etc:

    多个具有不同位置,缩放级别等的地图:

      1. Just add the extra parameters to the [bgmp-map] shortcode.

      2. 只需将额外的参数添加到[bgmp-map]短代码中。

        Here’s an example of the different ones you can use:

      3. 这是您可以使用的其他示例:

      [bgmp-map categories=”parks,restaurants” width=”500″ height=”500″]

      [bgmp-map Categories =”公园,餐厅”,宽度=“ 500”,高度=” 500”]

      [bgmp-map placemark=”105″ center=”chicago” zoom=”10″ type=”terrain”]

      [bgmp-map placemark =“ 105” center =“芝加哥” zoom =“ 10” type =“地形”]

      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. 转到“地标”菜单,然后单击“类别”,然后为每组地标添加一个类别。

        3. Edit your placemarks and click on the category you want to assign them to.
        4. 编辑您的地标,然后单击您要为其分配的类别。

        5. Edit the place where the map is embedded and add the category parameter to the shortcode.

        6. 编辑嵌入地图的位置,并将category参数添加到简码中。

          For example: [bgmp-map categories=”restaurants,record-stores”] or [bgmp-map categories=”parks”].

          例如:[bgmp-map类别=“餐厅,唱片店”]或[bgmp-map类别=“公园”]。

          Use the category’s slug, which is displayed on the Categories page in step 1. Separate each slug with a comma.

        7. 使用类别的标签,该标签在步骤1的“类别”页面上显示。每个标签用逗号分隔。

        8. You can add the [bgmp-map] shortcode to multiple pages, each time using a different set of categories.
        9. 您可以每次使用不同的类别集将[bgmp-map]简码添加到多个页面。

        Setting the stacking order of overlapping markers:

        设置重叠标记的堆叠顺序:

          1. Choose which placemark you want to appear on top and edit it.
          2. 选择要在顶部显示的地标,然后对其进行编辑。

          3. Enter a number in the Stacking Order meta box in the right column that is greater than the other placemark’s stacking order.
          4. 在右列的“堆叠顺序”元框中输入一个大于其他地标堆叠顺序的数字。

          Adding a text-based list of placemarks to a page:

          将基于文本的地标列表添加到页面:

            1. Edit the post or page you want the list to appear on.
            2. 编辑您希望列表显示的帖子或页面。

            3. Type [bgmp-list] in the context area.
            4. 在上下文区域中输入 [bgmp-list]

            5. Click the ‘Publish’ or ‘Update’ button.
            6. 点击“发布”或“更新”按钮。

            7. (optional) You can specifiy a specific category or categories to pull from.

            8. (可选),您可以指定一个或多个特定类别从中提取。

              e.g., [bgmp-list categories=”record-stores,parks”]

            9. 例如[bgmp-list category =”唱片商店,公园”]

            10. (optional) You can add “View on Map” links to each item in the list, which will open the corresponding marker’s info window.

            11. (可选),您可以向列表中的每个项目添加“在地图上查看”链接,这将打开相应标记的信息窗口。

              e.g., [bgmp-list viewonmap=”true”]

            12. 例如[bgmp-list viewonmap =“ true”]

            Using [bgmp-map] in a template file with do_shortcode():

            在带有do_shortcode()的模板文件中使用[bgmp-map]:

            For efficiency, the plugin only loads the required JavaScript, CSS and markup files on pages where it detects the map shortcode is being called.

            为了提高效率,该插件仅在检测到正在调用地图短代码的页面上加载所需的JavaScript,CSS和标记文件。

            It's not practical to detect when do_shortcode() is used in a template, so you need to manually let

            检测何时在模板中使用 do_shortcode()是不切实际的,因此您需要手动设置

            the plugin know to load the files by adding this code to your theme:

            插件知道如何通过将以下代码添加到主题来加载文件:

            function bgmpShortcodeCalled()

             函数bgmpShortcodeCalled()

            {    

            {    

            global $post;    

            全球$ post;    

            $shortcodePageSlugs = array(        

            $ shortcodePageSlugs =数组(        

            'hello-world',        

            '你好,世界',        

            'second-page-slug'    

            “第二页子弹”    

            );    

            );    

            if( $post )        

            if($ post)        

            if( in_array( $post->post_name, $shortcodePageSlugs ) )            

            如果(in_array($ post-> post_name,$ shortcodePageSlugs))            

            add_filter( 'bgmp_map-shortcode-called', '__return_true' );

            add_filter('bgmp_map-shortcode-known','__return_true');

            }

            }

            add_action( 'wp', 'bgmpShortcodeCalled' );

            add_action('wp','bgmpShortcodeCalled');

            Copy and paste that into your theme's functions.php file or a

            将其复制并粘贴到主题的 functions.php 文件或

            >functionality plugin, update the function names and filter arguments, and then add the slugs of any pages/posts containing the map to $shortcodePageSlugs.

            >功能插件,更新函数名称和过滤器参数,然后将包含地图的任何页面/帖子的标签添加到$ 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()

             函数bgmpShortcodeCalled()

            {    

            {    

            global $post;    

            全球$ post;    

            if( ( function_exists( 'is_front_page' ) && is_front_page() ) || ( function_exists( 'is_home_page' ) && is_home_page() ) )        

            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_filter('bgmp_map-shortcode-known','__return_true');

            }

            }

            add_action( 'wp', 'bgmpShortcodeCalled' );

            add_action('wp','bgmpShortcodeCalled');

            Before version 1.9, you needed to use the bgmp_map-shortcode-arguments filter to pass shortcode arguments when calling do_shortcode() from a template, but that is no longer

            在1.9版之前,从模板调用 do_shortcode()时,您需要使用 bgmp_map-shortcode-arguments 过滤器传递短代码参数,但这不再是

            necessary.

            必要。

            You can simply pass the arguments in the do_shortcode() call, like this:

            您只需在 do_shortcode()调用中传递参数,就像这样:

            do_shortcode( '[bgmp-map center="Boston" zoom="5"]' );

              do_shortcode('[bgmp-map center =“ Boston” zoom =“ 5”]');

            Check the FAQ and 常见问题解答

            .org/support/plugin/basic-google-maps-placemarks">support forum if you have any questions.

            .org / support / plugin / basic-google-maps-placemarks“>支持论坛,如果有任何疑问。

下载地址
https://downloads.wordpress.org/plugin/basic-google-maps-placemarks.1.10.7.zip
-EOF-

AI助手支持GPT4.0