Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
geojsonconverter.php
1<?php
2
4
8
10{
15 public function read($input): ?BaseGeometry
16 {
17 try
18 {
19 $input = Json::decode($input);
20 }
21 catch (ArgumentException $ex)
22 {
23 return null;
24 }
25
26 if (!is_array($input))
27 {
28 return null;
29 }
30
31 return parent::read($input);
32 }
33
37 public function write(BaseGeometry $geometry)
38 {
39 return Json::encode(
40 parent::write($geometry)
41 );
42 }
43}