\CustomMaps
Custom users maps class
Synopsis
class CustomMaps
{
- // constants
- const UPLOAD_PATH = 'exports/';
- const EX_NO_MAP_ID = 'NOT_EXISTING_MAP_ID';
- const EX_NO_ITM_ID = 'NOT_EXISTING_ITEM_ID';
- const EX_NO_FILE = 'NOT_EXISTING_FILE';
- const EX_WRONG_EXT = 'WRONG_FILE_EXTENSION';
- const EX_WRONG_KML = 'WRONG_KML_FILE_FORMAT';
- // members
- protected array $allMaps = ;
- protected array $allItems = ;
- protected array $ymapsCfg = ;
- protected array $altCfg = ;
- protected array $itemTypes = ;
- protected string $center = '';
- protected string $zoom = '';
- // methods
- public void __construct()
- protected void loadYmapsConfig()
- protected void loadAlterConfig()
- protected void loadMaps()
- protected void setDefaults()
- protected void setItemTypes()
- protected string itemGetTypeName()
- protected void loadItems()
- public void setCenter()
- public void setZoom()
- protected string filterLayers()
- protected string mapControls()
- protected string mapContainer()
- public string renderMapList()
- public string itemEditForm()
- public void itemEdit()
- protected string itemsImportForm()
- public string catchFileUpload()
- protected array kmlExtractPlacemarks()
- protected void itemsImportKml()
- public string renderItemsListFast()
- public void renderItemsListJsonData()
- public string renderItemDuplicateList()
- public int itemDelete()
- protected string mapCreateForm()
- protected string mapEditForm()
- protected string mapListControls()
- public void mapCreate()
- public void mapDelete()
- public void mapEdit()
- public string mapGetName()
- protected string itemGetIcon()
- public string mapGetPlacemarks()
- protected string itemLocationForm()
- public void itemCreate()
- protected string mapAddMark()
- public string mapAddCircle()
- public string mapInit()
- public string mapLocationEditor()
Constants
Name | Value |
---|---|
UPLOAD_PATH | 'exports/' |
EX_NO_MAP_ID | 'NOT_EXISTING_MAP_ID' |
EX_NO_ITM_ID | 'NOT_EXISTING_ITEM_ID' |
EX_NO_FILE | 'NOT_EXISTING_FILE' |
EX_WRONG_EXT | 'WRONG_FILE_EXTENSION' |
EX_WRONG_KML | 'WRONG_KML_FILE_FORMAT' |
Members
protected
- $allItems
- $allMaps
- $altCfg
- $center
- $itemTypes
- $ymapsCfg
- $zoom
Methods
protected
- filterLayers() — Filters some layer from current
- itemGetIcon() — Returns icon for some item type
- itemGetTypeName() — Returns item type localized name
- itemLocationForm() — Returns item location form
- itemsImportForm() — Returns items import form
- itemsImportKml() — Performs import of uploaded KML file
- kmlExtractPlacemarks() — Extract placemarks to import
- loadAlterConfig() — Loads system-wide alter config into private config storage
- loadItems() — Loads all existing custom maps items into private data property
- loadMaps() — Loads existing custom maps into private data property
- loadYmapsConfig() — Loads system-wide ymaps config into private config storage
- mapAddMark() — Returns map mark
- mapContainer() — Returns empty map container
- mapControls() — Returns map controls
- mapCreateForm() — Returns map creation form
- mapEditForm() — Returns custom map editing form
- mapListControls() — Returns map list controls panel
- setDefaults() — Sets default map center and zoom
- setItemTypes() — Sets available item types into private data property
public
- __construct()
- catchFileUpload() — Catches file upload
- itemCreate() — Creates new map item in database
- itemDelete() — Deletes item from database by its ID
- itemEdit() — Changes existing item properties in database
- itemEditForm() — Returns item edit form
- mapAddCircle() — Returns map circle
- mapCreate() — Creates new custom map in database
- mapDelete() — Deletes existing custom map by its ID
- mapEdit() — Changes existing custom map name in database
- mapGetName() — Returns existing custom map name by its Id
- mapGetPlacemarks() — Returns list of map placemarks
- mapInit() — Returns initialized JS map
- mapLocationEditor() — Return geo coordinates locator with embedded form
- renderItemDuplicateList() — Returns list of duplicate coords/name items for some existing map
- renderItemsListFast() — Returns existing map items list datatables container
- renderItemsListJsonData() — Renders custom map items list JSON data
- renderMapList() — Returns existing maps list view
- setCenter() — Sets override map center
- setZoom() — Sets map override zoom