Hi all, this page to explain some tricks about how to use RVM at its best with current functionality.
We’ll try to cover general questions we’ve gathered from the support page of WordPress forum and via email.
Thanks for your inputs, feedback and for your support to this project!

Manually copy markers from an old map to a new one

If you had not exported markers using the available feature since ver. 5.5.3, or the importing process is not going well for any reason, just go for the manual mode.
In the next clip we will show how to retrieve data from old map and move to the new map.
It’s basically a matter of copy&paste …as always!
For the example in the video we chose Map of Germany with two markers ( Berlin and Munich ).
Enjoy the video!

Manually copy subdivisions from an old map to a new one

If you had not exported subdivions settings using the available feature since ver. 5.5.3, or the importing process is not going well for any reason, just go for the manual mode.
We will use a video to explain how to do it.

How can I set bigger dimensions for markers’ pinpoints ?

Is not possible set an absolute dimension for markers’ pinpoints. You’ll be able to see different dimensions just filling the “Dimension” field of at least 2 markers: this because markers’ pinpoints dimensions are relative.
So, what can I do to display them bigger ?
You can use a “trick” :

  1. create markers you need ( start with a couple ) with a dimension suites your need
  2. create one fake marker with incorrect long and lat ( or not in the map you are using ) and assign it a small dimension…
  3. adjust markers’ dimensions suiting your needs

Soon you’ll see your markers of the desired dimensions on your wonderful RVM map !

I was installing a custom map but I’ve got an error

Following instructions does not apply to new generation of maps that can be installed like plugins. On each map page there is a green box displaying “Easy installation” message.

As said in this page, installing custom map ( a dowloaded one from this site or one you created following the RVM map format ) is an easy task in RVM, especially from ver 5.0 where Media Uploader has been integrated directly into the settings page.
Randomly some users reports issues, probably due to interaction with other plugins ( i.e.: WooCommerce ).
Our advice is to:

  1. disable temporarily other plugins
  2. install the custom map
  3. publish the map
  4. Re.enable all the other plugins

If you went into issue saying “Damned… Something went wrong ! Please check if name of the map is correct ( place just map name) or if you have uploaded the map previous month and try again uploading map now using wordpress media uploader“, please :

  1. Delete map directory in your wp-uploads directory
  2. Use “Add New Map” > in ‘select map’ field choose “Add Custom Map”
  3. click on “Select Map” button
  4. Delete old zip file of the map previously installed ( it’s just a reference, but better cleaning up ) in your Media Library, upload again your custom map ( the zip file )
  5. click on “Install Your Map”
  6. publish

In case above suggestions will not fix it, we need to switch to manual way, like they do for lunar module approach 🙂
First of all, do not panic!

  1. Unzip purchased map and move unzipped map folder into /wp-content/uploads/{current year}/{current month} . If you have not year and month folder please create them.
  2. Check into your Database, in options table (should be wp_options by default), and search for rvm_custom_maps_options field. If you have not, please create it.
  3. If you are attempting to install your first custom map erase the content of rvm_custom_maps_options and replace with


    a:1:{s:{string count}:"{your-map-folder}";s:8:"{aaaa}/{mm}/";}

    where {string count} is the total count of {your-map-folder} ( i.e.: france-districts_mill_en ), {aaaa} year in four digits format and {mm} month in two digits format (i.e.: 2018/05/).
    Save it clicking on submit button.

  4. If you have already other custom maps installed move to last semicolon and curly bracket “;}” of rvm_custom_maps_options and between the semicolon and the curly bracket add


    s:{string count}:"{your-map-folder}";s:8:"{aaaa}/{mm}/";

    where again {string count} is the total count of {your-map-folder} ( i.e.: france-districts_mill_en ), {aaaa} year in four digits format and {mm} month in two digits format (i.e.: 2018/05/).


    And add one unit to initial element index "a:".
    So for example if you have 
    a:2 it means you've already 2 maps installed and needs to become a:3 and so on
    

    Save it clicking on submit button.

  5. Now when you try to add a new map in RVM, you should see your map under Custom map list.

Let’s do a practical example.
Imagine you are trying to install France districts map, and you’ve purchased and downloaded france-districts_mill_en.zip on April 2018.
Now you’ve tried to install the map using the standard method (“Add New Map” —> “Add Custom Map” —> select the france-districts_mill_en.zip via the RVM media uploader —> “Install Map”) but something did not work.
You followed all the steps sent along with the purchase email confirmation but no way to install it.
Unzip purchased map and move unzipped map folder into /wp-content/uploads/2018/04.
If you have not current year and month folder please create them.

  1. Check into your Database, in options table (should be wp_options by default), and search for rvm_custom_maps_options field. If you have not, please create it.
  2. If you are attempting to install your first custom map erase the content of rvm_custom_maps_options and replace with


    a:1:{s:24:"france-districts_mill_en";s:8:"2018/04/";}

    france-districts_mill_en is 24 characters length, while 2018/04/ is 8 characters length.
    Save it clicking on submit button.

  3. If you have already other custom maps installed your first characters should be an a, followed by a number, something likea{integer-number}where {integer-number} is the total number of custom maps you’ve already installed.
    So in case you have a1, means you have 1 map, a2 2 maps and so on.
    Imagine you have already installed map of Africa ( africa_mill_en.zip ) on March 2018, in your rvm_custom_maps_options field you should have


    a:1:{s:14:"africa_mill_en";s:8:"2018/03/";}

    Now move to last semicolon and curly bracket “;}” and add following :


    s:24:"france-districts_mill_en";s:8:"2018/04/";

    Your rvm_custom_maps_options should look like the following:


    a:2:{s:14:"africa_mill_en";s:8:"2018/03/";s:24:"france-districts_mill_en";s:8:"2018/04/";}

    Save it clicking on submit button.

  4. When you try to add a new map in RVM, you should see your map under Custom map list.

In order to count total characters in map name we’ve used
https://wordcounter.net/
but feel free to use your favourite online tool !

How get rid of subdivisions’ name on mouse hover

Download latest RVM version to get this feature!
Since version 6.0.0 you can use a checkbox inside RVM main settings to enable this functionality.

Translate subdivisions’ names on front end ( visible map on your site )

Please refer to “Translate RVM maps into multiple languages” page to easily change subdivisions’ names.

Translate subdivisions’ names on subdivisions settings tab

In order to modify the default maps coming with RVM, please open corresponding map you need to modify in following location:
responsive-vector-maps > includes > regions
Ie.: to modify Belgium subdivisions’ names, open belgium-regions.php with your favourite editor and change only the last item of the array ( ‘Brussels’ in case of first row ).
If you want to modify a custom map downloaded from this site, please search for map you would like to update inside the wordpress “wp-content” > “uploads” folder
and open the rvm-cm-settings.php .
Open it and update only the last element of the array ( same as we did above for settings ).

Number of markers can be saved

If you are trying to save a big amount of markers, may happen you see they are not saved from a certain number onward.
Inserting manually into DB it works… so what ?
Newer versions of PHP , by default, are set to accept only one thousand of parameters sent by a form.
Considering the fact that main settings, subdivisions and markers fields are sent as a whole, it means that unfortunately you reached this quota !
We tried this plugin : https://wordpress.org/plugins/wp-max-submit-protect/
which basically alerts you when this limit is reached.
Here an explanation on how to solve it via php.ini or via htaccess file.
Newer versions of PHP implement a php.ini directive called max_input_vars usually set to 1000. This means that posting > 1000 form fields for instance would be truncated preventing data from being saved.
This can be changed in php.ini:

max_input_vars = 2000

If you need to do this via htaccess (on a shared host for instance) you may use:

php_value max_input_vars 2000

This is the page where I’ve got the workaround above : http://docs.woothemes.com/document/problems-with-large-amounts-of-data-not-saving-variations-rates-etc/ ).
Please let us know if you are able to solve it.
 

If you can, please give a hand to this project to fly !