MapTiler as a Map Source

Any online map source that uses OpenStreetMap can be used for your map tiles. Instructions are provided in Change the Map Source.

One of the sources used by VTScada is MapTiler™. If you have a MapTiler account, you can download your choice of map tiles to create a static image set on your server, or you can use their online service if you are interested in a map style that includes vector or image data, including GIS information(*).

(* VTScada can use 3rd party software to generate map tiles that contain layers of map and GIS data. But note that as far as VTScada is concerned, these maps are only raster images. To display additional information about sites on your maps, refer to Design Your Own Tagsand Custom Map Icons.)

To generate a static image set using MapTiler™ Desktop:

This option is best if you wish to pay only a one-time fee for MapTiler™, or would like to add a custom image/vector set to a machine that is not connected to the internet. A trial of MapTiler™ Desktop is available at https://www.maptiler.com/desktop/

  1. After downloading and installing MapTiler™ Desktop, load in your image or vector-set and cross reference this with a real-map location if necessary.
  2. When asked for the output format and settings, choose “Folder with tiles”. Select "No" for transparency (and choose a background color, if desired), and select "png" for compression.
    Changes to any other settings are optional, but take note of the specified max and min zoom levels.
  3. Click “Render” and export to an empty folder.
    Inspect the preview to ensure that your work appears as expected.
  4. Create a new VTScada Map source. See: Change the Map Source.
    • To improve the look of the map, ensure you set the BGColor to the same color as was set when exporting the files from MapTiler™ Desktop.
    • If a URL is defined from which to download additional map tiles, these will not mesh seamlessly with those produced by MapTiler™ Desktop. This can be mitigated through Map Area limiting: (Limit the Map Area)
  5. If this behavior is not sufficient, consider using MapTiler™ Cloud.
  6. Copy the folder contents, excluding any .html and .json files, into your VTScada folder’s appropriate Data\SlippyMapTiles\MapTypeN folder
  7. Restart VTScada.
    On a page containing a map, navigate to the map location you have specified and choose the new map type you have created. Ensure you are at a zoom-level for which you have generated map tiles. You should be able to view your map. You can now add widgets on top of your custom map.

To use a custom full map style containing vector or image data using MapTiler™ Cloud:

This option is best if you are able to pay the subscription fee to MapTiler™, and would like to incorporate GIS data and/or images onto a full, custom styled map. A trial of MapTiler™ Cloud is available at: https://www.maptiler.com/cloud/

  1. First, add your custom data sources.
    1. To upload GIS/vector data, go to the data section, click New DataSet and then upload files.
      Upload your .geojson, .gpx, .kml, .shp or .zip shapefile.
    2. For uploading a custom image-set, use the MapTiler™ Desktop process described earlier, but choose “GeoPackage” or “MBtiles” output, rather than “Folder With Tiles”.
      In MapTiler™ Cloud, go the the Tiles section and click “New Tileset”.
      Upload the GeoPackage or MBTiles file you created.
  2. Create your custom map as follows:
    Navigate to the maps section of MapTiler™ Cloud.
    Choose one of the standard maps as a starting point and click to open it.
    Click "Customize a copy" and save the map with a name of your choice. (Make note of the name)
    You can perform some basic styling in this window, but to add your own custom data and images, click advanced editing and then convert.
  3. Add your datasources. Click Data Sources at the top of the window and add the layer(s) you would like to include in the map.
  4. Click "Add a layer"
    Give it an appropriate name and choose the way you would like it to be drawn.
    For custom images, choose Raster. For vectors, choose the appropriate type.
    Select your data source and add the layer.
  5. You can customize the way the layers appear on the map using the editor in this window. After you are done editing, click Save and then Close.
  6. To access the map in VTScada, navigate to your new nap and click Publish if the map is not already published.
    Look under the Raster tiles section on your map’s page and copy the 512x512 XYZ URL. This should contain “.png” somewhere within it, not “.json”.
  7. Create a new VTScada Map source.
    See: Change the Map Source and [SlippyMapRemoteTileSourceN][SlippyMapRemoteTileSourceN] Section.
  8. For the URL, paste that copied from MapTiler™ Cloud in the previous step and replace “/{z}/{x}/{y}” with “%Z/%X/%Y”. Optionally, you can cut the text after “key=” with “%KEY”, and paste it into the APIKeyValue field in the Setup.INI section. Ensure the APIKeyEncrypted is set to 0 in this case.
  9. Restart VTScada. On a page containing a map, navigate to the map location you have specified and choose the new map type you have created. You should be able to view your map. You can now add widgets on top of your custom map.

 

VTScada will download the map tiles only once and cache them for improved performance. If a change is made to the map in MapTiler cloud, these will not be brought into VTScada automatically. There are two ways to force a fresh download:

Navigate to the [VTScada Installation Folder]Data\SlippyMapTiles\MapTypeN folder and delete the contents. VTScada will download the necessary tiles as you browse maps.

Use of Bulk tile downloading tool and select the “Overwrite existing tiles” option. (Bulk Downloads of Map TilesBulk Downloads of Map Tiles.)

Note that VTScada uses a service to share map tiles between workstations in networked applications. In this case a Client or Backup Server will get their map tiles from the Primary Server, rather than directly from the URL.

 

An additional service is available from MapTiler™ called MapTiler™ Server. This allows a networked machine to act as the map server, rather than connecting to the cloud. This has the benefit of allowing custom map tiles served from an internal network, rather than using a cloud-based service. Tilesets and maps can be created on a source machine and uploaded to the server. Here the map service (raster tiles) URL can be used in the Setup.INI file for sourcing map information on your network.