You are here

function openlayers_layer_type_tms::options_form_validate in Openlayers 7.2

Validation handler for the options form.

Overrides openlayers_layer_type::options_form_validate

File

plugins/layer_types/openlayers_layer_type_tms.inc, line 117
TMS Layer Type

Class

openlayers_layer_type_tms
OpenLayers TMS Layer Type class

Code

function options_form_validate($form, &$form_state) {
  if (!is_numeric($form_state['data']['tileOrigin']['lon'])) {
    form_set_error('tileOrigin][lon', t('Tile origin, longitude should be a numeric value.'));
  }
  if (!is_numeric($form_state['data']['tileOrigin']['lat'])) {
    form_set_error('tileOrigin][lat', t('Tile origin, latitude should be a numeric value.'));
  }
}