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 a 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 speed. 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, OpenStreetMap classicOpenStreetMap german, 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. Select the checkbox next to the option Use custom tile provider.
  3. Custom tile provider edit box will appear, with sample code that you can use to define your custom tile provider. You can find the API that you need to use to define a custom tile provider in the AnyLogic API reference.
  4. When you select this advanced option, the supported providers are grayed out and unavailable.

Related topics

 GIS Tutorial

 Navigating a GIS Map