Font size

Finding locations on GIS map

AnyLogic provides a search menu to help you find locations on a GIS map. When you enter a search query in the search box, AnyLogic will find places that match the query and create a list of search results. Also, AnyLogic will mark all search results on the map with a specified markup element, such as a GIS Point or a GIS Region.

Search results are temporary; every time you run a new search they update. But sometimes it might be useful to keep search results so that you can use them again in your model without going online to run a new search. AnyLogic helps you keep a map element that you found by saving it as a GIS Point or a GIS Region.

If you are using a tiled GIS map, not an offline shapefile map, AnyLogic obtains search results from an online server. In this case, you should have network connection to perform search.

A search is first performed in the visible area of a map; then, if no results are found there, AnyLogic searches throughout the whole map.

You may set a custom search area in the Search section of the GIS map properties, which will differ from the visible area of a map.

To find an element on a map

  1. Double-click the GIS map to enter its edit mode.
  2. You will see the search box to enter your query.
  3. To enter a query, click in the search box. You will then see additional search parameters for you to select the kind of element you are looking for: a Point (such as a city, a shop, or a street), or a Region (region, district, country). Select the appropriate parameter, and type your query.

  4. To start searching for locations on the map that match your query, click the Search button or press Enter.
  5. Point elements found on the map are marked with a GIS Point markup element, and areas are marked with a GIS Region element. If you select a search result, you will see its full address in the Title of its Properties view.

  6. AnyLogic will display all locations it found as temporary elements in the GIS Search Results view.
    In case you do not obtain any results, and see the Temporary GIS Elements (0 items) line in the GIS Search Results view, check your network connection.

  7. To make the location of a GIS Search Results element appear in the map’s center, double-click on it.
  8. Using the context menu that opens when you right-click an element listed in the GIS Search Results, you can place an agent at its location.
  9. If you clear the search box or type another query, search results from the prior query are discarded.

To keep search results in the model

  1. Search for a location on the map, and then go to the GIS Search Results view.
  2. Select the location that you need to keep in the model for further use.
  3. Right-click this element and select the option Convert To GIS Points/Regions, or click the button in the view toolbar. This location will be saved in the model as a GIS Point or a GIS Region, depending on the type of element you are saving.

  4. The converted elements are displayed with a color that is different from the color for elements that are still temporary, both in the search results list and on the map.

  5. Now this element will be cached and saved with the other model files. You can find converted elements in the model tree under Agent type > Presentation > Map name.

  6. If you go to a converted element’s Properties view, you will see its full address in the Title field:

  7. A converted element is pinned to a particular location on the map. If you need to move it to another location, in its Properties view, deselect the Lock the location option.

To find and convert a region or a multiregion

  1. The instructions listed above also apply to searching for a region and converting the search results into a GIS Region element in order to keep it in the model. In the figure below you can see that the top search result, which is a region, has been converted:

  2. Sometimes when you search for a region, such as a country, the search results found on the map may not be one single region, but a “multiregion”, which is a special GIS markup element.

  3. A GIS Multiregion  is a group of regions united under one Title for your convenience. You can convert a multiregion search result just like a GIS Region search result.
  4. AnyLogic will create several converted regions on the map as well as a multiregion that contains all the regions. You can find these new converted element in the model tree, under the map:

  5. In the model tree you can manage the regions. For example, you might remove regions that you do not need.
  6. Whenever you need to edit all of these regions at once, navigate to the GIS multiregion properties and click the button Select regions, and this multiregion will turn into the multiple selection of these regions.

To clear the search results

  1. Navigate to the GIS Search Results view.
  2. To remove one search result element, right-click it in the list, and choose Remove elements from the context menu.
  3. To remove all elements, right-click any element in the list, and choose Remove all elements from the menu.
  4. Alternatively, click the button to remove one selected element, or
    Click the button to clear all search results.

  5. All temporary GIS markup elements on the map will also be cleared.

GIS Search Results view

This view displays the results of a GIS search.

Here is what the GIS Search Results view looks like:

The GIS Search Results view

To show or hide the GIS Search Results view

  1. Choose View >  GIS Search Results from the main menu.

Search results are displayed as the list of temporary GIS elements.

You can double-click an element to show in on the map. Also, you can convert any temporary element into a GIS markup element, or create an agent in the selected location.

Icon Command Description
Convert to GIS Points / Regions This command converts a temporary search result to a GIS markup element.
Remove elements This command removes a selected element in the list of search results.
Remove all elements This command removes all elements in the list.
Show elements Shows the selected element in the center of the map.
How can we improve this article?