简体   繁体   中英

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)

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.

Is anyone very familiar with the mapify system and know where to edit the custom map options.

Hunted around the plugin files until I found what looked to be the .js file designating map options.

Turned out to be located in wp-content > plugins > mapifypro-master > assets > 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. (screenshot attached)

screenshot of map-instance.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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