Ejemplo n.º 1
0
 public function getMainLayers($layers, $backpath = '')
 {
     // Main layer
     $i = 0;
     $jsMainLayer = '';
     foreach ($layers as $layer) {
         $jsMainLayer .= $this->getLayer($layer, $i, $backpath);
         $i++;
     }
     tx_odsosm_div::addJsFiles($this->scripts);
     return $jsMainLayer;
 }
    public function getMapBE($layers, $mode, $lat, $lon, $zoom)
    {
        $jsMainLayer = $this->getMainLayers($layers, $GLOBALS['BACK_PATH'] . '../');
        // Include JS
        $this->getMapCore($GLOBALS['BACK_PATH'] . '../');
        tx_odsosm_div::addJsFiles($this->scripts);
        // Action
        switch ($mode) {
            case 'vector':
                $action = $this->getJSvectors();
                break;
            default:
                $action = $this->getJScoordinates();
                break;
        }
        return 'var map; //complex object of type OpenLayers.Map

' . $action . '

	function map(){
		' . $this->getMapMain() . '
		' . $jsMainLayer . '
		' . $this->getMapCenter($lat, $lon, $zoom) . '
		mapAction();
	}';
    }