MapSVG WordPress plugin

Contents

1. How to set different Google Map position on mobile devices

2. How to update the plugin

3. Directory is empty

1. How to set different Google Map position on mobile devices

Add the following code to MapSVG > Menu > JavaScript > afterLoad, change numbers as needed:

function(){
  if(MapSVG.isPhone){
    this.getData().googleMaps.map.setCenter({lat: 55.33, lng: 33.22});
    this.getData().googleMaps.map.setZoom(2);
  }
}

2. How to update the plugin

There are 2 ways to update the plugin listed below. 

Map settings are stored in the MySQL database. Custom uploaded SVG files are stored in the "uploads" folder outside of the plugin folder. So there's no risk of losing your map settings during the update process, even if you click "delete plugin" in the WP Dashboard.

1) Download .zip containing the MapSVG plugin from CodeCanyon. Unpack it and copy "mapsvg" folder via FTP to your server to the following folder: /wp-content/plugins. Say "yes" to overwrite the existing "mapsvg" folder. 

2) Go to WP Admin > Plugins > Installed plugins > MapSVG > click "Deactivate". Then click "Delete".  Again, don't worry about your map settings - they will not be deleted. Then go to: WP Admin > Plugins > Add new. Click "Upload plugin" button and choose .zip containing the plugin. After upload finishes, click "Activate".

3. Directory is empty

You turned on the Directory, but it's empty. How to fix that:

  1. Check that you've chosen a correct source: Menu > Directory > Source
  2. Check the template: Menu > Templates > Directory item. It should contain some fields of the chosen source. For example, if you've chosen "Regions" as the source, "Directory item template" may look like this to show a name of a country or state/province:
    {{title}}
    Please note that {{title}} field is available only in geo-calibrated maps! If you use one of the uncalibrated maps, use {{id}} or any custom region field that you've added by yourself.

    If you've chosen "Database" as the source of the Directory, the template should contain your custom DB Object fields:
    {{my_custom_field_name}}
  3. If you've chosen a custom container for the Directory, check its ID (Menu > Directory > Custom container ID) and check that the container with that ID exists on your page.