⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_draw_map.phtml

📁 Welcome to MS4W, the no fuss installer for setting up MapServer on Microsoft Windows platforms. The
💻 PHTML
字号:
<HTML><BODY BGCOLOR="#CCCCCC"><CENTER><H1>PHP/MapScript module test</H1><P> <?php//// This example opens a regular MapServer .MAP file, renders the main// Map image (with the default layers enabled), the legend and the // scale bar, and displays them in the HTML output.////// Load MapScript module.//if (PHP_OS == "WINNT" || PHP_OS == "WIN32"){  dl("php3_mapscript.dll");}else{  dl("php_mapscript.so");}// // Load MapServer .map file//// You can download the MapServer demo data from http://mapserver.gis.umn.edu///$map = ms_newMapObj("demo.map");// print $map->numlayers;// phpinfo(); //// RENDER MAIN MAP//// Note: If you get errors with the saveWebImage() call below, then make sure// that the directory specified by IMAGEPATH in the .MAP file exists and is// writable by the httpd user.//$img = $map->draw();$url = $img->saveWebImage(MS_PNG, 0, 0, 0);printf("<IMG SRC=%s WIDTH=%d HEIGHT=%d>\n", $url, $map->width, $map->height); //// LEGEND//$img = $map->drawLegend();$url = $img->saveWebImage(MS_PNG, 0, 0, 0);printf("<P><IMG SRC=%s>\n", $url); //// SCALE BAR//$img = $map->drawScaleBar();$url = $img->saveWebImage(MS_PNG, 0, 0, 0);printf("<P><IMG SRC=%s>\n", $url); ?> </BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -