-
大小: 12.49MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-08-05
- 语言: JavaScript
- 标签: supermap 超图 javascript api 案例
资源简介
supermap 官方中文 iclient 6R for javascript开发入门文档 案例
代码片段和文件信息
#!/usr/bin/env python
import sys
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:
import closure
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 = “library.cfg“
filename = “proj4js-compressed.js“
outputFilename = “../lib/“ + filename
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.“
merged = mergejs.run(sourceDirectory None configFilename)
print “Setting the filename to “+filename
merged = merged.replace(‘scriptName: “proj4js.js“‘‘scriptName: “‘+filename+‘“‘);
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 ‘\nClosure Compilation using Web service has completed successfully.‘
elif use_compressor == “closure“:
minimized = closure.minimize(merged)
else: # fallback
minimized = merged
print “Adding license file.“
minimized = file(“license.txt“).read() + minimized
print “Writing to %s.“ % outputFilename
file(outputFilename “w“).write(minimized)
print “Done.“
if __name__ == ‘__main__‘:
opt = optparse.OptionParser(usage=“%s [options] [config_file] [output_file]
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-04-27 14:42 apidoc\
目录 0 2013-04-27 14:41 apidoc\files\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\ba
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Control\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Feature\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Filter\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Geometry\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Handler\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\la
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\la
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Popup\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Protocol\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Protocol\WFS\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\Data\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\la
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\MapService\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\Measure\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\NetworkAnalyst\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\Query\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\ServerType\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\Service\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\SpatialAnalyst\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\Theme\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\REST\TrafficTransferAnalyst\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Request\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Strategy\
目录 0 2013-04-27 14:41 apidoc\files\SuperMap\Symbolizer\
目录 0 2013-04-27 14:42 apidoc\index\
目录 0 2013-04-27 14:42 apidoc\ja
............此处省略1123个文件信息
- 上一篇:jQuery基础教程第四版中文pdf版+配套源码
- 下一篇:城市级联之三级联动
相关资源
-
ECMAsc
ript 2018快速入门 黄灯桥 2018. -
ja
vasc ript语言精粹.pdf超清版 -
ja
vasc ript课程设计及其课程项目实 -
ja
vasc ript构建Web和ArcGIS Server应用实 - cococoscreator 十三水四色牌
-
ja
vasc ript入门到精通课程PPT -
数据结构与算法ja
vasc ript描述 完整 -
北大青鸟 S2 ja
vasc ript课件和源码 -
5个亲测好用的基于ja
vasc ript的开源 -
ja
vasc ript程序设计基础教程 -
ja
vasc ript面向对象编程指南第2版 -
Noesis.ja
vasc ript.0.7.1.0.zip -
ja
vasc ript设计模式 (美)哈梅斯( -
ja
vasc ript高级程序设计第3版PDF中文 -
高性能ja
vasc ript + 高清+目录 PDF -
ja
vasc ript高级程序设计第3版带书签 -
supermap for ja
vasc ript 8c 2017开发包 -
单页Web应用:ja
vasc ript前端到后端 -
ja
vasc ript权威指南第六版(中文非 -
ArcGIS API for ja
vasc ript 4.5 API - WebGIS基础实践demo(基于ArcGIS API for
-
ja
vasc ript高级程序设计第3版高清完 -
ja
vasc ript学习指南 第3版@www.java -
effective ja
vasc ript中文版 带书签 -
实测PDF:ja
vasc ript设计模式与开发 -
ja
vasc ript权威指南 - 北大青鸟—S2结业项目
-
SuperMap iClient for ja
vasc ript开发教程 -
ja
vasc ript高级程序设计中文版epu -
ja
vasc ript The Definitive Guide 6th Edit
评论
共有 条评论