简体   繁体   English

MapifyPro-限制可见区域和缩放级别

[英]MapifyPro - limit viewable area and zoom level

Apologies for the narrow application of this question. 对于这个问题的狭义应用表示歉意。

I want to limit viewable area and zoom using the MapifyPro plugin for wordpress just like this user did: stack-overflow Q&A (6 years ago) 我想使用MapifyPro插件来限制可查看区域并使用wordpress进行缩放,就像该用户一样: 堆栈溢出问答(6年前)

I want to allow displaying only a certain area and disallow the user to slide elsewhere. 我只允许显示某个区域,而不允许用户滑动到其他位置。 Also I want to restrict the zoom level - eg only between levels 2 and 6. 我也想限制缩放级别-例如仅在级别2和6之间。

Is anyone very familiar with the mapify system and know where to edit the custom map options. 是否有人对mapify系统非常熟悉,并且知道在何处编辑自定义地图选项。

Hunted around the plugin files until I found what looked to be the .js file designating map options. 搜寻插件文件,直到找到指定地图选项的.js文件。

Turned out to be located in wp-content > plugins > mapifypro-master > assets > js > map-instance.js 原来位于wp-content>插件> mapifypro-master>资产> js> map-instance.js

After finding this file it was a process of adding the code from stack overflow Q&A (6 years ago) and changing the variable map to mapify's designation of mpfy_map. 找到此文件后,这是一个从堆栈溢出问答(6年前)添加代码并将变量map更改为mapify的mpfy_map指定的过程。 (screenshot attached) (附屏幕截图)

screenshot of map-instance.js map-instance.js的屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM