內容簡介
Map Near Me 是一個帶有搜尋詞的短代碼,讓您能在您的網站上插入一個帶有郵遞區號欄位的按鈕。點擊按鈕會在另一個分頁上打開 Google 地圖,列出在輸入的郵遞區號附近所有基於您的搜索詞的結果。選擇性地,可以禁用郵遞區號欄位,這將搜索所有在最終用戶位置附近的東西。
典型用途:
將其用作簡單的商店定位器,列出位於特定郵遞區號內的所有商店。
在您的博客上使用,提供與您的文章相關的任何東西的位置。
幫助您的讀者找到最近的公園、郵局、市政廳或任何東西!
此外採用了不需要獲取 Google API 的方式,因為它不會將 Google 資產嵌入到您的網站中,而是在獨立的瀏覽器分頁中打開 Google 地圖。
操作說明
至少必須提供一個參數。此參數將作為搜索詞列表傳遞給 Google。如果有多個搜索詞,則所有詞都必須用空格分隔並用引號括起來。默認情況下,郵遞區號輸入欄位將始終顯示在可點擊的按鈕之後。
範例:
[map_near_me barber] 或 [map_near_me “barber shop”] 將在一個標有「尋找 [搜索詞]」的按鈕之後顯示郵遞區號輸入欄位。點擊按鈕將打開包含搜索詞的 Google 地圖。如果最終用戶提供了郵遞區號,則郵遞區號將包含在傳給 Google 地圖的搜索詞中。如果未提供郵遞區號,Google 地圖將默認搜索最終用戶位置附近的所有內容。
[map_near_me keyword=”parks”] 使用 name-value pair「keyword」的搜尋詞。最終結果與未使用「keyword」name-value pair 相同,但如果使用任何選用的 name-value pair,則必須使用「keyword」name-value pair。
[map_near_me keyword=”post office” zipcode=1] 或 [map_near_me keyword=”post office” zipcode=0] – 默認情況下,將顯示一個郵遞區號輸入欄位,該欄位將允許用戶將關鍵字限制在特定的郵遞區號中。如果需要,可以禁用郵遞區號輸入欄位。如果未提供郵政編碼,或者如果郵政編碼欄位被禁用,則 Google 將嘗試在用戶附近搜索關鍵字搜尋詞。指定「1」將啟用郵遞區號輸入欄位,而指定「0」則會禁用它。
[map_near_me keyword=”library” label=”圖書館在哪裡?”] – 默認情況下,按鈕標籤始終為「尋找 [搜尋詞]」。如果需要,可以通過使用標籤屬性來覆蓋標籤。
欲了解更多範例或查看演示,請瀏覽 Map Near Me 外掛頁面。
外掛標籤
開發者團隊
原文外掛簡介
Map Near Me is a shortcode with a search word that allows the ability to insert a button with a zip code field on your website. Clicking on the button will open a Google map page on a separate tab listing everything based on your search word located near the entered zip code. Optionally, the zip code field can be disabled, which will search everything located near the end user’s location.
Typical uses:
Use it as a simple store locator listing all of your stores in a specific zipcode.
Use on your blog to provide locations of just about anything related to your article.
Help your readers find the nearest park, post office, city hall, or anything!
This plugin avoids having to get a Google API because it does not embed Google assets into your website, instead, it opens Google maps in a separate browser tab.
Instructions
At a minimum, there must be at least one argument supplied. This argument will be passed on to Google as the search word(s) list on the map. If there are multiple search words, then all the words must be separated by a space and enclosed in quotes. By default, the zipcode input field will always be shown followed by a clickable button.
Examples:
[map_near_me barber] or [map_near_me “barber shop”] will show the zip code input field followed by a button that is labeled as Find [search word(s)] Near me. Clicking on the button will open Google map with the search words passed in. If zip code is suppled by the end user, then the zip code will be included in the search word that is passed to Google map. If the zip code is not supplied, then Google map will search near the end user’s location by default.
[map_near_me keyword=”parks”] uses the name-value pair of “keyword” with search words. The end result is the same as if the “keyword” name-value pair is not used, however, if any of the optional name-value pairs are used, then the “keyword” name-value pair must be used.
[map_near_me keyword=”post office” zipcode=1] or [map_near_me keyword=”post office” zipcode=0] – by default, a zip code input field will appear next to the submit button which will allow the user to restrict the keyword to a specific zip code. If desired, you may disable the zip code input field. If no zip code is supplied, or if the zip code field is disabled, then Google will attempt to search near the user’s location with the keyword search word. Assigning a “1” will enable the zip input field and assigning a “0” will disable it.
[map_near_me keyword=”library” label=”Where is the library?”] – by default, the button label will always be “Find [keyword] Near Me”. If desired, you may override the label by using the label attribute.
For more examples, or to see a demo, visit the Map Near Me plugin page.
