How to use the csv/xls/xlsx/ods import and export feature

Maps Marker Pro allows you to easily perform bulk updates on markers and layers by using the integrated import/export feature. Below you will find the documentation for these features. If anything is unclear, please open a support ticket at https://mapsmarker.com/helpdesk and we will be glad to help!

Index


Key points

  • import can be used to bulk create new markers or layers as well as bulk update existing markers or layers
  • available export formats: XLSX, XLS, CSV, ODS
  • available import formats: XLSX, XLS, CSV, ODS
  • recommended format: XLSX or ODS due to usability and better handling of quotes
  • important when using CSV as format: use semi-colons ; as delimiters and replace double quotes ” with single quotes ‘
  • usage of html tags in popuptext is possible (again: use single quotes in CSV files!)
  • only XLSX format allows “native hyperlinks” (created for example in Excel by right mouseclick / add hyperlink)
  • only users with the the user role needed for editing markers/layers from other users can run imports (by default: admins only/capability activate_plugins)
  • if you want to transfer all markers and layers from one site to another, you first have to export/import all layer maps from the old site and then export/import all markers maps on the new site – please also see the related remarks below!

back to index


Important remarks about copying maps from another site

It is possible to use the import/export feature to copy marker and layer maps from one site to another. Anyway please keep in mind, that after you imported the layers from the old site to your new site, the layer IDs might be different! (e.g. on the old site the layer IDs could have been 1,2,4,7 which on a brand new site with no layer created yet would get the IDs 1,2,3,4)

So in order to also assign the markers from the old site to the same layers on the new site you might need to change the values in the column layer in the related marker import file from the old site to fit the new layer IDs on the new site!

Depending on the numbers of layers to add, an easier alternative for copying layers and markers from another site could be to use tools like phpmyadmin to export the following database tables on the old site and import them on the new site: wp_pro_current_leafletmapsmarker_layers and wp_pro_current_leafletmapsmarker_markers

back to index


Import/export startscreen

To start an import or export of markers, please navigate to “Import/Export” within the plugin´s menu:

import-select-action

back to index


Marker exports

In order to do a bulk update of existing markers, you need to export your markers first. Click on “prepare export” interface as next step: 

export-screen 

Then select the markers which should be exported – you can use different filters for that. Please note that by default only 100 markers get exported, so increase this number if needed. Choose an export format (XLSX or ODS is recommened) and start the export – the download of the selected markers in the desired format will start immediately afterwards.

back to index


Marker imports

Please note that if a marker is assigned to a specific layer, this layer has to be present before you import the marker! If the layer with the specified layerid from the import file is not available, the marker will not be assigned to any layer! So if you want to transfer all markers and layers from one site to another site, you have to first export/import all layers and then export/import all markers! Below the interface for preparing an import – available options are explained below: 

import-screen

back to index


Download import template files

Below you find import templates for all available formats. These contain an example for creating a new marker and for updating an existing marker with the ID 1.

back to index


Import mode options

import-mode-options-markers

If you choose the default option “bulk additions (add new markers)”, the values in the column ID from the import file will be ignored and new markers are created.

On the other hand, if you select “bulk updates (update existing markers)”, the values in the column ID from the import file are needed and according markers are updated respectively the row from import file is skipped, if no marker map with an according ID exists.

back to index


Geocoding options

By default, the value in the column address is used to fetch the according longitute and latitude value from Google Places API: geocoding-option

Please be aware that if you use the default option here, any value in the columns lat and lon will be overwritten with the results for the address given from Google Places API.

back to index


Audit options

By default, your username of the WordPress user starting the import and the current timestamp will be used for the colums createdon, createdby, updatedon, updatedby:

audit-option

If you want to import the values as given in your import file, you have to change this option.

back to index


Caching methods

By default, the available caching method which uses the least memory is used – you can override this by clicking on “show more options” next to “automatic” and manually selecting the desired caching method (non available caching methods on your server are disabled automatically):

caching-methods-detailled

If an import or export fails anyway (by using a too large import file for example), try increasing the PHP memory limit on your server first. If that does not help, try splitting the large import file into different smaller ones. Changing from XLSX to CSV can also help reducing memory usage. When switching to CSV is not an option, you can also enable the checkbox shown above to “further reduce memory usage for xlsx/xls/ods input files by only importing linktext for hyperlinks”.

back to index


Test mode

When running an import, by default the option “Test mode” is turned on:

test-mode

It is recommended to first make a “dry run” with test mode on before turning it off. With test mode on, the import file will be checked for warnings and errors. You will be told exactly which values from which row are not valid and be able to correct those before saving the changes to the database: test-mode-on-logs3

If no errors or warnings are found, go back to “prepare import”, turn test mode off and start the import again.

back to index


Error handling

We integrated several checks which should prevent the import to fail. Anyway if something goes wrong, you will be shown exactly what went wrong:

Warnings

If a WARNING occurs, this means that the value given is not allowed (for example by using 2 when only 0 or 1 is allowed). The importer then uses the default value for new markers when a new marker is created or the existing value before the update, when an already existing marker is updated: warning-example

Errors

If an ERROR occurs, the row in question will be skipped, and no new marker for this row from the import file will be created or updated:

error-example

back to index


Layer exports

In order to do a bulk update of existing layers, you need to export your layers first. Click on “prepare export” interface as next step: 

export-layers

 

Then select the layers which should be exported. Choose an export format (XLSX or ODS is recommened) and start the export – the download of the selected layers in the desired format will start immediately afterwards.

back to index


Layer imports

Please note that if you import layer maps, the assigned markers will not be imported automatically – you have to do this manually via “Marker imports” function! So if you want to transfer all markers and layers from one site to another site, you have to first export/import all layers and then export/import all markers! Below the interface for preparing an import – available options are explained below:

import-layers

back to index


Download import template files

Below you find import templates for all available formats. These contain an example for creating a new layer and for updating an existing layer with the ID 1.

back to index


Import mode options

 

import-mode-options-layers

If you choose the default option “bulk additions (add new layers)”, the values in the column ID from the import file will be ignored and new layers are created.

On the other hand, if you select “bulk updates (update existing layers)”, the values in the column ID from the import file are needed and according layers are updated respectively the row from import file is skipped, if no layer map with an according ID exists.

back to index


Geocoding options

By default, the value in the column address is used to fetch the according longitute and latitude value from Google Places API: geocoding-option

Please be aware that if you use the default option here, any value in the columns lat and lon will be overwritten with the results for the address given from Google Places API.
 

Audit options

By default, your username of the WordPress user starting the import and the current timestamp will be used for the colums createdon, createdby, updatedon, updatedby: audit-option

If you want to import the values as given in your import file, you have to change this option.
 

Caching methods

By default, the available caching method which uses the least memory is used – you can override this by clicking on “show more options” next to “automatic” and manually selecting the desired caching method (non available caching methods on your server are disabled automatically):

caching-methods-detailled

If an import or export fails anyway (by using a too large import file for example), try increasing the PHP memory limit on your server first. If that does not help, try splitting the large import file into different smaller ones. Changing from XLSX to CSV can also help reducing memory usage.

back to index


Test mode

When running an import, by default the option “Test mode” is turned on:

test-mode

It is recommended to first make a “dry run” with test mode on before turning it off. With test mode on, the import file will be checked for warnings and errors. You will be told exactly which values from which row are not valid and be able to correct those before saving the changes to the database (the test mode is basically the same as for marker maps, so same screenshot is shown):
test-mode-on-logs3
If no errors or warnings are found, go back to “prepare import”, turn test mode off and start the import again.
 

Error handling

We integrated several checks which should prevent the import to fail. Anyway if something goes wrong, you will be shown exactly what went wrong:

Warnings

If a WARNING occurs, this means that the value given is not allowed (for example by using 2 when only 0 or 1 is allowed). The importer then uses the default value for new markers when a new marker is created or the existing value before the update, when an already existing marker is updated (same as marker maps, so same screenshot is shown): warning-example

Errors

If an ERROR occurs, the row in question will be skipped, and no new marker for this row from the import file will be created or updated (same as marker maps, so same screenshot is shown):

error-example

back to index


Columns reference for csv/xls/xlsx/ods import/export marker files

Column nameData typesDescription
idNULL or INTEGERmarker ID
If empty, a new marker will be created - if an ID is given, the marker with that ID will be updated
markernameNULL or STRINGname of the marker
popuptextNULL or STRINGtext to be used in the popup
HTML tags allowed, use single quotes ' in CSV files! "Native hyperlinks" (see XLSX template) only work in XLSX files!
openpopupBOOLEANShould the popup be opened by default?
0 = popup closed
1 = open popup
addressNULL OR STRINGAddress of the marker
Used for geocoding if option "use address for geocoding" is set
latFLOATVALLatitude of the marker
gets overwritten if option "use address for geocoding" is set
lonFLOATVALLongitude of the marker
gets overwritten if option "use address for geocoding" is set
layerINTEGERID of the layer the marker should be assigned to
0 = not assigned to a layer
zoomINTEGERZoom level of the marker map
iconSTRINGIcon of the marker map
enter filename of icon from marker-icon-directory (usually wp-content/uploads/leaflet-maps-marker-icon) - example: audio.png - leave empty to use default icon (blue pin)
mapwidthINTEGERWidth of the marker map in pixel
mapwidthunitSTRINGMap with unit of the marker map width
Possible values: px and %
mapheightINTEGERHeight of the marker map in pixel
basemapSTRINGBasemap of the marker map
possible values: osm_mapnik, mapquest_osm, mapquest_aerial, googleLayer_roadmap, googleLayer_satellite, googleLayer_hybrid, googleLayer_terrain, bingaerial, bingaerialwithlabels, bingroad, ogdwien_basemap, ogdwien_satellite, mapbox, mapbox2, mapbox3, custom_basemap, custom_basemap2, custom_basemap3, empty_basemap
panelBOOLEANmarker panel above the map (showing markername and API link)
0 = do not show panel
1 = show panel
controlboxINTEGERshow controlbox in top right corner of the map which allows you to switch between basemaps
0 = do not show controlbox
1 = show controlbox collapsed
2 = show controlbox expanded
createdbySTRINGUsername of user who created the marker map
using current username if option "use current userlogin" is set
createdonDATE (Y-m-d H:i:s)When was the marker created?
updatedbySTRINGUsername of user who updated the marker map
using current username if option "use current userlogin" is set
updatedonDATE (Y-m-d H:i:s)When was the marker updated?
kml_timestampDATE (Y-m-d H:i:s)Timestamp to use for KML animation feature
overlays_customBOOLEANActivate custom overlay?
0 = inactive
1 = active
overlays_custom2BOOLEANActivate custom overlay2?
0 = inactive
1 = active
overlays_custom3BOOLEANActivate custom overlay3?
0 = inactive
1 = active
overlays_custom4BOOLEANActivate custom overlay4?
0 = inactive
1 = active
wmsBOOLEANActivate custom wms layer?
0 = inactive
1 = active
wms2BOOLEANActivate custom wms2 layer?
0 = inactive
1 = active
wms3BOOLEANActivate custom wms3 layer?
0 = inactive
1 = active
wms4BOOLEANActivate custom wms4 layer?
0 = inactive
1 = active
wms5BOOLEANActivate custom wms5 layer?
0 = inactive
1 = active
wms6BOOLEANActivate custom wms6 layer?
0 = inactive
1 = active
wms7BOOLEANActivate custom wms7 layer?
0 = inactive
1 = active
wms8BOOLEANActivate custom wms8 layer?
0 = inactive
1 = active
wms9BOOLEANActivate custom wms9 layer?
0 = inactive
1 = active
wms10BOOLEANActivate custom wms10 layer?
0 = inactive
1 = active
gpx_urlSTRINGURL for GPX file to use
gpx_panelBOOLEANPanel below map showing GPX metadata
0 = hide gpx panel
1 = show gpw panel

back to index


Columns reference for csv/xls/xlsx/ods import/export layer files

Column nameData typesDescription
idNULL or INTEGERmarker ID
If empty, a new marker will be created - if an ID is given, the marker with that ID will be updated
nameNULL or STRINGname of the layer
addressNULL OR STRINGAddress of the layer center
Used for geocoding if option "use address for geocoding" is set
layerviewlatFLOATVALLatitude of the layer center
gets overwritten if option "use address for geocoding" is set
layerviewlonFLOATVALLongitude of the layer center
gets overwritten if option "use address for geocoding" is set
layerzoomINTEGERZoom level of the layer map
mapwidthINTEGERWidth of the layer map in pixel
mapwidthunitSTRINGMap with unit of the layer map width
Possible values: px and %
mapheightINTEGERHeight of the layer map in pixel
basemapSTRINGBasemap of the layer map
possible values: osm_mapnik, mapquest_osm, mapquest_aerial, googleLayer_roadmap, googleLayer_satellite, googleLayer_hybrid, googleLayer_terrain, bingaerial, bingaerialwithlabels, bingroad, ogdwien_basemap, ogdwien_satellite, mapbox, mapbox2, mapbox3, custom_basemap, custom_basemap2, custom_basemap3, empty_basemap
panelBOOLEANlayer panel above the map (showing layername and API link)
0 = do not show panel
1 = show panel
clusteringBOOLEANShould markers be clustered?
0 = clustering disabled
1 = clustering enabled
listmarkersBOOLEANShould a list of markers be displayed below the layer map?
0 = no
1 = yes
multi_layer_mapBOOLEANIs this layer map a multi-layer-map?
0 = no
1 = yes
multi_layer_map_listSTRINGcomma-separated IDs of the layers assigned to this layer if multi_layer_map is set to 1
e.g. 1,2,3
controlboxINTEGERshow controlbox in top right corner of the map which allows you to switch between basemaps
0 = do not show controlbox
1 = show controlbox collapsed
2 = show controlbox expanded
createdbySTRINGUsername of user who created the layer map
using current username if option "use current userlogin" is set
createdonDATE (Y-m-d H:i:s)When was the layer created?
updatedbySTRINGUsername of user who updated the layer map
using current username if option "use current userlogin" is set
updatedonDATE (Y-m-d H:i:s)When was the layer updated?
overlays_customBOOLEANActivate custom overlay?
0 = inactive
1 = active
overlays_custom2BOOLEANActivate custom overlay2?
0 = inactive
1 = active
overlays_custom3BOOLEANActivate custom overlay3?
0 = inactive
1 = active
overlays_custom4BOOLEANActivate custom overlay4?
0 = inactive
1 = active
wmsBOOLEANActivate custom wms layer?
0 = inactive
1 = active
wms2BOOLEANActivate custom wms2 layer?
0 = inactive
1 = active
wms3BOOLEANActivate custom wms3 layer?
0 = inactive
1 = active
wms4BOOLEANActivate custom wms4 layer?
0 = inactive
1 = active
wms5BOOLEANActivate custom wms5 layer?
0 = inactive
1 = active
wms6BOOLEANActivate custom wms6 layer?
0 = inactive
1 = active
wms7BOOLEANActivate custom wms7 layer?
0 = inactive
1 = active
wms8BOOLEANActivate custom wms8 layer?
0 = inactive
1 = active
wms9BOOLEANActivate custom wms9 layer?
0 = inactive
1 = active
wms10BOOLEANActivate custom wms10 layer?
0 = inactive
1 = active
gpx_urlSTRINGURL for GPX file to use
gpx_panelBOOLEANPanel below map showing GPX metadata
0 = hide gpx panel
1 = show gpw panel

back to index


Import/Export FAQs

Expand allClose all

Special characters are not imported!

This can be occur when you are using a CSV import file which does not have UTF-8 as character set. Please try switching to XLSX or ODS format if possible, which are more fail-safe here.

Permalink. Mark as helpful. 2

Can I import markers from the free version?

Yes, you can use export files created with the version for imports in Maps Marker Pro.

Permalink. Mark as helpful. 6

back to index