Пример #1
0
 if (json_decode($_POST['filteredColumns']) == "") {
     $_POST['filteredColumns'] = "[]";
 }
 /* All iz Well, Now create map and shapes/markers */
 $mapId = createMap($userId, 550, 1000, 6, 'false', 'true', 'true', '', '[0,0]', '', $_POST['filteredColumns']);
 if (!$mapId) {
     $error = "Map is not created!";
 } else {
     updateMap($mapId, $userId, 'source', 'website');
     $properties = array();
     $type = array();
     $coordinates = array();
     $styles = array();
     $customproperties = array();
     foreach ($validRows as $row) {
         $shape = prepareShapeData($row);
         $type[] = $shape['type'];
         $coordinates[] = $shape['coordinates'];
         $properties[] = $shape['properties'];
         $styles[] = $shape['styles'];
         $customproperties[] = $shape['customproperties'];
     }
     updateMap($mapId, $userId, 'stylingcolumn', $_POST['stylingColumn']);
     updateMap($mapId, $userId, 'shapestyling', $_POST['shapeStyling']);
     updateMap($mapId, $userId, 'name', $_POST['map-name']);
     updateMap($mapId, $userId, 'height', (int) $_POST['map-height']);
     updateMap($mapId, $userId, 'width', (int) $_POST['map-width']);
     updateMap($mapId, $userId, 'zoom', (int) $_POST['map-zoom']);
     updateMap($mapId, $userId, 'password', $_POST['map-password']);
     updateShapes($mapId, $properties, $type, $coordinates, $styles, $customproperties);
     $_SESSION['csv']['data'] = null;
Пример #2
0
 if (json_decode($_POST['filteredColumns']) == "") {
     $_POST['filteredColumns'] = "[]";
 }
 /* All iz Well, Now create map and shapes/markers */
 $mapId = (int) $_POST['csv_id'];
 if (!$mapId) {
     $error = "Map is not Updated!";
 } else {
     $properties = array();
     $type = array();
     $coordinates = array();
     $styles = array();
     $customproperties = array();
     $i = 0;
     foreach ($validRows as $row) {
         $shape = prepareShapeData($row, $i++);
         $type[] = $shape['type'];
         $coordinates[] = $shape['coordinates'];
         $properties[] = $shape['properties'];
         $styles[] = $shape['styles'];
         $customproperties[] = $shape['customproperties'];
     }
     updateMap($mapId, $userId, 'stylingcolumn', $_POST['stylingColumn']);
     updateMap($mapId, $userId, 'shapestyling', $_POST['shapeStyling']);
     updateMap($mapId, $userId, 'filteredcolumns', $_POST['filteredColumns']);
     updateMap($mapId, $userId, 'name', $_POST['map-name']);
     updateMap($mapId, $userId, 'height', (int) $_POST['map-height']);
     updateMap($mapId, $userId, 'width', (int) $_POST['map-width']);
     updateMap($mapId, $userId, 'zoom', (int) $_POST['map-zoom']);
     updateMap($mapId, $userId, 'password', $_POST['map-password']);
     updateShapesPoints($mapId, $properties, $type, $coordinates, $styles, $customproperties);