You are here

function _openlayers_cck_generate_pair in Openlayers 6.2

Same name and namespace in other branches
  1. 6 modules/openlayers_cck/openlayers_cck.module \_openlayers_cck_generate_pair()

Generate Random Lat and Lon

Return value

A space separated longitude and latitiude

1 call to _openlayers_cck_generate_pair()
_openlayers_cck_content_generate in modules/openlayers_cck/includes/openlayers_cck.generate.inc
Private callback for same hook.

File

modules/openlayers_cck/includes/openlayers_cck.generate.inc, line 77
Implementations of content generate for openlayers_cck

Code

function _openlayers_cck_generate_pair() {
  $lat = (double) ((mt_rand(0, 120000) - 60000) / 1000);
  $lon = (double) ((mt_rand(0, 360000) - 180000) / 1000);
  return (string) $lon . ' ' . (string) $lat;
}