openlayers/openlayers.module, line 614
- Versions
- 6
_openlayers_create_map_id()
Create Map ID
Create a unique ID for any maps that are not assigned an ID
@note Technically someone can assign a map ID identical to the one that is created
Return value
New map id
Code
<?php
function _openlayers_create_map_id() {
// Set up variables
$map_id = '';
static $map_count = 0;
// Put together ID
$map_id = OPENLAYERS_MAP_ID_PREFIX .'-'. $map_count;
// Add another
$map_count += 1;
// Return ID
return $map_id;
}
?> 