Map service options
On the Details pane for Map charts, you can select the map service to use for providing map images.
Configuring map service options
- Stop the IBM® SPSS® Modeler Server.
- If you're going to apply local geojson formatted map files, put them in the directory <Modeler_installation_directory>/dataview/conf/public/mapfiles. If the directory doesn’t exist, create it.
- Open the file <Modeler_installation_directory>/dataview/conf/application.conf
in a text editor and add the following options to the
map.resources
section. In this example, two new maps namedWorld - Local Map
andWorld - Online Map
are added.map.resources { "mapservices" : [ { "type" : "geojson", "name" : "World (Bulit-in)", "location" : "built_in_world", "id" : "built_in_world" }, { "type" : "geojson", "name" : "Blank (Built-in)", "location" : "built_in_blank", "id" : "built_in_blank" }, { "type" : "geojson", "name" : "World - Local Map", "location" : "/mapfiles/world.json", "useProxy" : "false", "id" : "world_local" }, { "type" : "geojson", "name" : "World - Online Map", "location" : "http://map.example.com/map/world.json", "useProxy" : "true", "id" : "world_online" } ] }
The following parameters are available for the map options:Table 1. Map service parameters Option Value Type Required? Description type
geojson
String Yes Currently, only the value geojson
is supported for this option.name
Map name String Yes Enter a name for the map. This name is shown in the Map service drop-down on the Details pane for map charts. location
Map location String Yes Enter the URL or local file location of the map. For URL, it must begin with http://
orhttps://
. For local file, it must begin with the path /mapfiles/.useProxy
true
orfalse
String Yes Use true
if the map location is a URL. Usefalse
if the map location is a local file.id
Map ID String Yes Use an unique ID for each map. Note:- Don't remove the default World (Built-in) and Blank (Built-in) options.
- Remember to use a comma between the content blocks as shown in the example, and be sure your new
map.resources
section is valid JSON formatted content. - The IBM SPSS Modeler Server (or the standalone SPSS Modeler Client without Server) must be able to access the map location.
- Start the IBM SPSS Modeler Server.
Now while working with map charts, on the Details pane, you'll see the new map service you added.