
內容簡介
YaMaps外掛是在你的網站上插入Yandex地圖的最簡單方式。該外掛具有用戶友好的界面。您可以在Yandex地圖上視覺化地放置標記,用鼠標移動它們,更改圖標等等。
使用新的Gutenberg編輯器,您需要先添加經典編輯器塊!
為了讓地圖搜索正常工作並找到路線,您可能需要在外掛設置頁面上設置API密鑰(JavaScript API和HTTP Geocoder)。
外掛亮點:
您可以在不編寫代碼的情況下向頁面添加地圖。
或者您可以在編輯器中視覺化編輯短碼。
您可以在一頁面上添加任意數量的地圖。
您可以在一張卡片上添加多個標記。
您可以添加帶有超鏈接的標記。
您可以在顏色選擇器中選擇標記的圖標及其顏色。
您可以在視覺化編輯器中選擇地圖類型(Map,Satellite,Hybrid),地圖縮放,地圖控制。
短碼結構
yamap center - 地圖中心座標
yamap height - 地圖高度
yamap zoom - 地圖縮放比例(0到19)
yamap scrollzoom - 滾動縮放鎖定(scrollzoom =“0”為鎖定)
yamap mobiledrag - 智能設備上可以禁用地圖拖動(mobiledrag =“0”為鎖定)
yamap type - 地圖類型(yandex#map,yandex#satellite,yandex#hybrid)
yamap 控制 - 由分號分隔的地圖控制(typeSelector;zoomControl;searchControl;routeEditor;trafficControl;fullscreenControl;geolocationControl)
yamap容器 - WP模板中現有塊的ID。地圖將放置在具有此ID的塊中。不會在內容中創建新塊。
yaplacemark coord - 標記坐標
yaplacemark icon - 標記圖標(Yandex.Map圖標類型或您自己圖像的URL)
yaplacemark color - 標記顏色
yaplacemark name - 標記提示或內容
yaplacemark url - 单击標記時會打開帶有ID的URL或文章
您可以在地圖的短碼中插入多個標記代碼。
短碼示例
[yamap center =“55.7532,37.6225” height =“15rem” zoom =“12” type =“yandex#map”控制=“typeSelector;zoomControl”] [yaplacemark coord =“55.7532,37.6225” icon =“islands#blueRailwayIcon” color =“# ff751f”名稱=“標記”] [/ yamap]
外掛標籤
開發者團隊
② 後台搜尋「YaMaps for WordPress Plugin」→ 直接安裝(推薦)
📦 歷史版本下載
原文外掛簡介
YaMaps plugin is the simplest way to insert Yandex maps on your site. The plugin has a user-friendly interface. You can visually put placemarks on your Yandex map, move them with your mouse, change icons and much more.
For use with the new Gutenberg editor, you need add the classic editor block first!
For the map search to work correctly and find routes, you may need to set an API key (JavaScript API и HTTP Geocoder) on the plugin settings page.
Plugin Highlights:
You can add maps to pages without coding.
Or you can visually edit the shortcodes in the editor.
You can add any number of maps to one page.
You can add multiple markers to one card.
You can add markers with hyperlinks.
You can select the icon and it’s color of the marker in the colorpicker.
You can select type of map (Map, Satellite, Hybrid), map zoom, map controls in the visual editor.
Shortcodes Structure
yamap center – Map center coordinates
yamap height – Map height
yamap zoom – Map zoom (0 to 19)
yamap scrollzoom – Scrollwheel zoom lock (scrollzoom=”0″ for lock)
yamap mobiledrag – Map dragging can be disabled for mobile devices (mobiledrag=”0″ for lock)
yamap type – Map type (yandex#map, yandex#satellite, yandex#hybrid)
yamap controls – Map controls separated by a semicolon (typeSelector;zoomControl;searchControl;routeEditor;trafficControl;fullscreenControl;geolocationControl)
yamap container – ID of the existing block in the WP template. The map will be placed in the block with this ID. The new block in the content will not be created.
yaplacemark coord – Placemark coordinates
yaplacemark icon – Placemark icon (Yandex.Map icon type or url of your own image)
yaplacemark color – Marker color
yaplacemark name – Placemark hint or content
yaplacemark url – Linked URL or post with ID will be opened by click on the placemark
You can insert multiple placemark codes inside the maps’s shortcode.
Shortcode Example
[yamap center="55.7532,37.6225" height="15rem" zoom="12" type="yandex#map" controls="typeSelector;zoomControl"][yaplacemark coord="55.7532,37.6225" icon="islands#blueRailwayIcon" color="#ff751f" name="Placemark"][/yamap]
