GIS map tile layer

AnyLogic provides a GIS map tile layer, which is a part of a GIS map that contains a tiled map. A tiled map is a map that is downloaded in real time from special online map services, such as OpenStreetMap. Such maps are called “tiled maps” because they are downloaded as tiles, which are small, usually square, images that are placed seamlessly side-by-side to construct the maps. You can choose an online tiled map service in the Properties section of a GIS Map shape.

When you navigate a tiled map at design time, all the tiles you display are saved in a special subfolder of the model folder called cache. With a cache, you do not have to continually make online requests when working with a section of a map. This makes you less dependent on an Internet connection and increases the model’s performance. It also allows you to easily share the model and to run it without an Internet connection. 

To change the tile provider

  1. Select the GIS map shape in the graphical editor and go to its Properties view.
  2. Open the Tiles section. There you will find a drop-down list with the supported online tile map services: AnyLogic OSM, OpenStreetMap classicOpenStreetMap german, OpenStreetMap humanitarian, LandSat, or Cycle map.

  3. When you choose an online map service from the list, the map will update automatically.

If none of these online services meets your needs, you can add a map from the shapefiles on your computer, or define a custom tile provider.

To enable custom tile provider

  1. Select the GIS map shape in the graphical editor and go to its Properties view.
  2. Open the Advanced section and select the Use custom tile URL check box.
  3. In the text field that appears, provide the tile map service URL. The URL must end with the [x]/[y]/[zoom].png placeholder, which handles requesting the tile with the appropriate x and y coordinates and zoom level from the tile server, e.g.:[zoom]/[x]/[y].png. For details on the URL scheme, see the OpenStreetMap wiki page.

    Note that if a custom tile provider is used, selecting tile providers manually from the Tile provider list is disabled.

Related topics

 GIS tutorial

 Navigating a GIS map