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.
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.
To find an element on a map
- Double-click the GIS map to enter its edit mode.
- You will see the search box to enter your query.
- 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.
- To start searching for locations on the map that match your query, click the Search button or press Enter.
- 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.
-
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.
- To make the location of a GIS Search Results element appear in the map’s center, double-click on it.
- 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.
- 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
- Search for a location on the map, and then go to the GIS Search Results view.
- Select the location that you need to keep in the model for further use.
- 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.
- 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.
- 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.
- If you go to a converted element’s Properties view, you will see its full address in the Title field:
- 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
- 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:
- 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.
- 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.
- 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:
- In the model tree you can manage the regions. For example, you might remove regions that you do not need.
- 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
- Navigate to the GIS Search Results view.
- To remove one search result element, right-click it in the list, and choose Remove elements from the context menu.
- To remove all elements, right-click any element in the list, and choose Remove all elements from the menu.
-
Alternatively, click the button to remove one selected element, or
Click the button to clear all search results. - All temporary GIS markup elements on the map will also be cleared.
This view displays the results of a GIS search.
Here is what the GIS Search Results view looks like:
To show or hide the GIS Search Results view
-
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?
-