-
大小: 10.8MB文件類型: .zip金幣: 2下載: 0 次發布日期: 2023-10-05
- 語言: JavaScript
- 標簽: OpenLayers??
資源簡介
OpenLayers 是一個專為Web GIS 客戶端開發提供的JavaScript 類庫包,用于實現標準格式發布的地圖數據訪問。從OpenLayers2.2版本以后,OpenLayers已經將所用到的Prototype.js組件整合到了自身當中,并不斷在Prototype.js的基礎上完善面向對象的開發,Rico用到地方不多,只是在OpenLayers.Popup.AnchoredBubble類中圓角化DIV。

代碼片段和文件信息
#!/usr/bin/env?python
import?sys
import?os
sys.path.append(“../tools“)
import?mergejs
import?optparse
def?build(config_file?=?None?output_file?=?None?options?=?None):
????have_compressor?=?[]
????try:
????????import?jsmin
????????have_compressor.append(“jsmin“)
????except?ImportError:
????????print?“No?jsmin“
????try:
????????#?tools/closure_library_jscompiler.py?from:?
????????#???????http://code.google.com/p/closure-library/source/browse/trunk/closure/bin/build/jscompiler.py
????????import?closure_library_jscompiler?as?closureCompiler
????????have_compressor.append(“closure“)
????except?Exception?E:
????????print?“No?closure?(%s)“?%?E
????try:
????????import?closure_ws
????????have_compressor.append(“closure_ws“)
????except?ImportError:
????????print?“No?closure_ws“
????
????try:
????????import?minimize
????????have_compressor.append(“minimize“)
????except?ImportError:
????????print?“No?minimize“
????use_compressor?=?None
????if?options.compressor?and?options.compressor?in?have_compressor:
????????use_compressor?=?options.compressor
????sourceDirectory?=?“../lib“
????configFilename?=?“full.cfg“
????outputFilename?=?“Openlayers.js“
????if?config_file:
????????configFilename?=?config_file
????????extension?=?configFilename[-4:]
????????if?extension??!=?“.cfg“:
????????????configFilename?=?config_file?+?“.cfg“
????if?output_file:
????????outputFilename?=?output_file
????print?“Merging?libraries.“
????try:
????????if?use_compressor?==?“closure“:
????????????sourceFiles?=?mergejs.getNames(sourceDirectory?configFilename)
????????else:
????????????merged?=?mergejs.run(sourceDirectory?None?configFilename)
????except?mergejs.MissingImport?E:
????????print?“\nAbnormal?termination.“
????????sys.exit(“ERROR:?%s“?%?E)
????print?“Compressing?using?%s“?%?use_compressor
????if?use_compressor?==?“jsmin“:
????????minimized?=?jsmin.jsmin(merged)
????elif?use_compressor?==?“minimize“:
????????minimized?=?minimize.minimize(merged)
????elif?use_compressor?==?“closure_ws“:
????????if?len(merged)?>?1000000:?#?The?maximum?file?size?for?this?web?service?is?1000?KB.
????????????print?“\nPre-compressing?using?jsmin“
????????????merged?=?jsmin.jsmin(merged)
????????print?“\nIs?being?compressed?using?Closure?Compiler?Service.“
????????try:
????????????minimized?=?closure_ws.minimize(merged)
????????except?Exception?E:
????????????print?“\nAbnormal?termination.“
????????????sys.exit(“ERROR:?Closure?Compilation?using?Web?service?failed!\n%s“?%?E)
????????if?len(minimized)?<=?2:
????????????print?“\nAbnormal?termination?due?to?compilation?errors.“
????????????sys.exit(“ERROR:?Closure?Compilation?using?Web?service?failed!“)
????????else:
????????????print?“Closure?Compilation?using?Web?service?has?completed?successfully.“
????elif?use_compressor?==?“closure“:
????????jscompilerJar?=?“../tools/closure-compiler.jar“
????????if?not?os.path.isfile(jscompilerJar):
????????????print?“\nNo?closure-compiler.jar;?read?README.txt!“
????????????sys.exit(“ERROR:?Closure?Co
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-07-03?06:52??Openla
?????目錄???????????0??2012-06-27?20:56??Openla
?????目錄???????????0??2012-07-03?06:52??Openla
?????文件?????????212??2012-06-27?20:56??Openla
?????文件????????1688??2012-06-27?20:56??Openla
?????文件?????????229??2012-07-03?06:52??Openla
?????文件?????????970??2012-07-03?06:52??Openla
?????文件????????9948??2012-06-27?20:56??Openla
?????文件?????????303??2012-06-27?20:56??Openla
?????文件?????????184??2012-07-03?06:52??Openla
?????目錄???????????0??2012-06-27?20:56??Openla
?????文件??????????79??2012-06-27?20:56??Openla
?????文件????????1173??2012-06-27?20:56??Openla
?????文件????????1078??2012-06-27?20:56??Openla
?????文件????????2222??2012-06-27?20:56??Openla
?????文件????????1592??2012-06-27?20:56??Openla
?????文件????????3511??2012-06-27?20:56??Openla
?????文件????????1541??2012-06-27?20:56??Openla
?????文件????????3565??2012-06-27?20:56??Openla
?????文件??????????42??2012-06-27?20:56??Openla
?????文件????????1211??2012-06-27?20:56??Openla
?????文件????????1614??2012-06-27?20:56??Openla
?????文件????????1565??2012-06-27?20:56??Openla
?????文件????????1612??2012-06-27?20:56??Openla
?????文件????????6628??2012-06-27?20:56??Openla
?????文件????????1458??2012-06-27?20:56??Openla
?????文件?????????354??2012-06-27?20:56??Openla
?????文件????????1499??2012-06-27?20:56??Openla
?????文件????????1696??2012-06-27?20:56??Openla
?????文件????????1024??2012-06-27?20:56??Openla
?????文件?????????564??2012-06-27?20:56??Openla
............此處省略2376個文件信息
評論
共有 條評論