Carbon_Fields\Field\Map_Field::to_json PHP Method

to_json() public method

This data will be available in the Underscore template and the Backbone Model.
public to_json ( boolean $load ) : array
$load boolean Should the value be loaded from the database or use the value from the current instance.
return array
    public function to_json($load)
    {
        $field_data = parent::to_json($load);
        $field_data = array_merge($field_data, array('lat' => is_float($this->lat) ? $this->lat : $this->default_lat, 'lng' => is_float($this->lng) ? $this->lng : $this->default_lng, 'zoom' => is_int($this->zoom) ? $this->zoom : $this->default_zoom, 'address' => $this->address));
        return $field_data;
    }