Configuring geolocation settings

Leaflet Maps

ResourceSpace can be configured to use a new open source mapping library called Leaflet Maps. The current system based on OpenLayers will soon be discontinued.

Please refer to Configuring Leaflet Maps for more information.

Tile servers

Showing exact geolocation data requires a large number of map images. These images take up a lot of disk space and the space required for them gets exponentially larger at each additional zoom level.

ResourceSpace does not specify tile servers by default but includes geographic map tiles with a very basic level of detail. This means that although you can see high level tiles users are unable to zoom into the maps to see exact locations unless you have configured tile servers in your configuration file.

Whilst there are free public tile servers available these will normally have strict usage limits. If you expect your ResourceSpace users to view or add detailed locations you should consider configuring tile servers

A list of tile servers can be found at

Geolocation and tile server configuration options

The following options can be configured to add tile servers and customise how gelocation data is displayed.

$geo_tile_servers An array of tile servers that you have access to e.g.
$geo_tile_servers = array();
$geo_tile_servers[] = '';
$geo_tile_servers[] = '';
$geo_tile_servers[] = '';
$geo_tile_caching* Set to true by default. Cache openstreetmap tiles on your ResourceSpace server?
$geo_tile_cache_directory* Optional path to tile cache directory. Useful if you are running multiple ResourceSpace instances
$geo_tile_cache_lifetime* How long will tiles be cached on the local server? Set to one year by default
Unless absolutely necessary this should be a long period to avoid too many requests to the tile server
$geo_tile_cache_lifetime = 60*60*24*365;
$hide_geolocation_panel Set to true to hide the geolocation panel by default and replace with a link
$geo_locate_collection Set to true to add a collection action that will show all resource geolocation data on a map
$geolocation_default_bounds* Set the default center and zoom for the map view when searching or selecting a new location.
# For example, to specify the USA use:

# For example, to specify Utah, use
$view_mapheight Height of map in pixels on resource view page
$geo_search_restrict* An array that specifies a list of upper/lower longitude/latitude bounds. These are areas that will be excluded from geographical search results.
Areas are defined using values in the following sequence:-

southwest lat, southwest long, northeast lat, northeast long

An example is as below
    array(50,-3,54,3,)      # Example omission zone
    array(-10,-20,-8,-18),  # Example omission zone 2
    array(1,1,2,2)          # Example omission zone 3

* These options normally require tile servers to be configured