You are here

function ip_geoloc_marker_dimensions in IP Geolocation Views & Maps 8

Same name and namespace in other branches
  1. 7 ip_geoloc.module \ip_geoloc_marker_dimensions()

Return the height and width of the markers in the selected set.

Return value

string For example '32 x 42' or '21 x 34'.

3 calls to ip_geoloc_marker_dimensions()
AdminConfigureForm::buildForm in src/Form/AdminConfigureForm.php
Form constructor.
IpGeoLocAPI::outputMapMultiLocation in src/Services/IpGeoLocAPI.php
Outputs an HTML div placeholder into which will be injected a Google map.
ip_geoloc_output_map_multi_location in ./ip_geoloc_api.inc
Outputs an HTML div placeholder into which will be injected a Google map.
1 string reference to 'ip_geoloc_marker_dimensions'
IpGeoLocGlobal::markerDimensions in src/Services/IpGeoLocGlobal.php
Return the height and width of the markers in the selected set.

File

./ip_geoloc.module, line 571
IPGV&M is a mapping engine for Views that contain locations of entities and/or visitors. Google Maps, Leaflet and OpenLayers2 maps are all supported and available through this module. Using a number of optional sources IPGV&M also retrieves…

Code

function ip_geoloc_marker_dimensions() {
  $config = \Drupal::config('ip_geoloc.settings');
  $dimensions = $config
    ->get('ip_geoloc_marker_dimensions');
  if (empty($dimensions)) {
    $directory = ip_geoloc_marker_directory();
    $dimensions = strpos($directory, '/amarkers') ? '32 x 42' : '21 x 34';
  }
  return $dimensions;
}