Skip to content
Snippets Groups Projects
Commit 855cbf96 authored by Aleix Quintana's avatar Aleix Quintana
Browse files

Resolve #3420247 "Uncaught typeerror once"

parent 53d120a0
No related branches found
No related tags found
1 merge request!1Resolve #3420247 "Uncaught typeerror once"
This diff is collapsed.
name: 'Mapbox gl location picker'
type: module
description: 'Mapbox gl location picker.'
core: 8.x
package: 'Other'
core_version_requirement: ^8 || ^9
core_version_requirement: ^8 || ^9 || ^10
dependencies:
- mapbox_gl:mapbox_gl
- geofield:geofield
......
......@@ -8,7 +8,7 @@ picker:
dependencies:
- core/drupal
- core/jquery
- core/jquery.once
- core/once
- core/drupalSettings
- mapbox_gl/libraries.mapbox-gl-js
......@@ -25,6 +25,13 @@ class MapboxOriginFilter extends GeofieldProximitySourceBase {
use MapboxMapHandlerTrait;
/**
* The map array to feed mapbox.
*
* @var array
*/
protected $map;
/**
* Constructs a ManualOriginDefault object.
*
......@@ -247,7 +254,7 @@ class MapboxOriginFilter extends GeofieldProximitySourceBase {
//$default_units = geofield_radius_options()[$this->viewHandler->options['units']];
if (
isset($form_state->getUserInput()[$this->viewHandler->options['id']]['source_configuration']['origin']['lat']) &&
isset($form_state->getUserInput()[$this->viewHandler->options['id']]['source_configuration']['origin']['lon'])
isset($form_state->getUserInput()[$this->viewHandler->options['id']]['source_configuration']['origin']['lon'])
){
$source_input = $form_state->getUserInput()[$this->viewHandler->options['id']]['source_configuration'];
$default_lat = round($source_input['origin']['lat'], 2);
......@@ -412,7 +419,7 @@ class MapboxOriginFilter extends GeofieldProximitySourceBase {
* @param array $in_vals
* The [lat lon] values
* @return array
* The items in array prepared to be included as feature to
* The items in array prepared to be included as feature to
* ::addSimpleFeature()
*/
protected function getItems($in_vals){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment