{"id":113,"date":"2019-09-20T07:00:23","date_gmt":"2019-09-20T07:00:23","guid":{"rendered":"https:\/\/www.loftocean.com\/eaven\/?p=113"},"modified":"2019-11-04T03:44:51","modified_gmt":"2019-11-04T03:44:51","slug":"display-pins-of-posts-on-google-map","status":"publish","type":"post","link":"https:\/\/www.loftocean.com\/eaven\/google-map\/display-pins-of-posts-on-google-map\/","title":{"rendered":"Display pins of posts on Google Map"},"content":{"rendered":"<p>To display pins linking to posts on the map, you need to add locations to your posts first. Please read the following section.<\/p>\n<hr>\n<h4>In Classic Editor<\/h4>\n<p>When you write a post, scroll down the edit page and then you will find the <strong>Eaven Single Post Options<\/strong> panel > <strong>Location<\/strong> field. If you are writing a post about a destination (country\/states\/city\/etc.), you can add the name of this destination to the <strong>Location<\/strong> field, such as &#8220;<i style=\"color: #999;\">Sydney, NSW, Australia<\/i>&#8220;.<\/p>\n<p><span class=\"highlighted\">Please note:<\/span> Do not add same location to different posts, otherwise, the post information cannot be displayed on the map when clicking on the pin.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-1440x631.png\" alt=\"\" width=\"1200\" height=\"526\" class=\"alignnone size-loft_extra_large wp-image-124\" srcset=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-1440x631.png 1440w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-300x131.png 300w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-768x336.png 768w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-1024x449.png 1024w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-360x158.png 360w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-480x210.png 480w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-720x315.png 720w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-960x421.png 960w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-1200x526.png 1200w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location.png 1598w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><strong>Latitude &#038; Longitude<\/strong><\/p>\n<p>After adding a location to a post, when saving the changes to this post, the Latitude &#038; Longitude values will be generated automatically from the location added. The Latitude &#038; Longitude values are required to display a pin on the map. You can add <strong>custom Latitude &#038; Longitude<\/strong> values if the map pin location in incorrect.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-1440x684.png\" alt=\"\" width=\"1200\" height=\"570\" class=\"alignnone size-loft_extra_large wp-image-125\" srcset=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-1440x684.png 1440w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-300x142.png 300w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-768x365.png 768w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-1024x486.png 1024w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-360x171.png 360w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-480x228.png 480w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-720x342.png 720w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-960x456.png 960w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long-1200x570.png 1200w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/lat-long.png 1596w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><span class=\"highlighted\">Please note:<\/span> The Google Map API key is required to auto generate Latitude &#038; Longitude values.<\/p>\n<div class=\"info-box\">\n<p>If you added some locations before adding your Google Map API key, please:<\/p>\n<ul>\n<li><strong>Method 1 &#8211;<\/strong> Re-save the posts to auto generate the Latitude &#038; Longitude values.<\/li>\n<li><strong>Method 2 &#8211;<\/strong> Or, on the post list page (dashboard > Posts > All Posts), find the <strong>&#8220;Map Location&#8221;<\/strong> column, then click on the <strong>&#8220;Generate Latitude &#038; Longitude&#8221;<\/strong> button for each post.<\/li>\n<\/ul>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-1440x531.jpg\" alt=\"\" width=\"1200\" height=\"443\" class=\"alignnone size-loft_extra_large wp-image-126\" srcset=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-1440x531.jpg 1440w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-300x111.jpg 300w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-768x283.jpg 768w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-1024x378.jpg 1024w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-360x133.jpg 360w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-480x177.jpg 480w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-720x266.jpg 720w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-960x354.jpg 960w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long-1200x443.jpg 1200w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/generate-lat-long.jpg 2000w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<hr>\n<h4>In Gutenberg Block Editor<\/h4>\n<p>If you use Gutenberg Block Editor, you can find the field for adding location in <strong>Theme Settings<\/strong> > <strong>Map Settings<\/strong> > <strong>Location<\/strong> field.<\/p>\n<figure id=\"attachment_127\" aria-describedby=\"caption-attachment-127\" style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-1440x900.jpg\" alt=\"\" width=\"1200\" height=\"750\" class=\"size-loft_extra_large wp-image-127\" srcset=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-1440x900.jpg 1440w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-300x188.jpg 300w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-768x480.jpg 768w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-1024x640.jpg 1024w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-360x225.jpg 360w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-480x300.jpg 480w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-720x450.jpg 720w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-960x600.jpg 960w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg-1200x750.jpg 1200w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/add-post-location-gutenberg.jpg 1800w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-127\" class=\"wp-caption-text\">Add post location in Gutenberg editor.<\/figcaption><\/figure>\n<hr>\n<p>Then, when you add a Google Map to your homepage (using the home widgets &#8220;Google Map&#8221;), or add a Google Map to your post\/page content (using Google Map shortcode or Gutenberg block), you will see a pin shown on the map. Click on this pin to display the thumbnail (featured image) and title of this post. Click it to go to this post.<\/p>\n<figure id=\"attachment_128\" aria-describedby=\"caption-attachment-128\" style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-1440x544.jpg\" alt=\"\" width=\"1200\" height=\"453\" class=\"size-loft_extra_large wp-image-128\" srcset=\"https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-1440x544.jpg 1440w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-300x113.jpg 300w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-768x290.jpg 768w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-1024x387.jpg 1024w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-360x136.jpg 360w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-480x181.jpg 480w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-720x272.jpg 720w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-960x363.jpg 960w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map-1200x454.jpg 1200w, https:\/\/www.loftocean.com\/eaven\/wp-content\/uploads\/sites\/10\/2019\/10\/pins-on-map.jpg 1778w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><figcaption id=\"caption-attachment-128\" class=\"wp-caption-text\">Pin of a post on the map.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>To display pins linking to posts on the map, you need to add locations to your posts first. Please read the following section. In Classic Editor When you write a post, scroll down the edit page and then you will find the Eaven Single Post Options panel > Location field. If you are writing a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-google-map"],"_links":{"self":[{"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":5,"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":135,"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/posts\/113\/revisions\/135"}],"wp:attachment":[{"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.loftocean.com\/eaven\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}