arcgis打印服务
<script>
function print1() {
require([
"esri/map",
"esri/dijit/Print",
"esri/tasks/PrintTask",
"esri/tasks/PrintParameters",
"esri/tasks/PrintTemplate",
"esri/layers/FeatureLayer",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/tasks/Geoprocessor",
"esri/SpatialReference",
"esri/symbols/TextSymbol",
"esri/symbols/Font",
"esri/graphic",
"esri/geometry/Point",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/Color",
"dojo/domReady!"
],
function (
Map,
Print,
PrintTask,
PrintParameters,
PrintTemplate,
FeatureLayer,
ArcGISDynamicMapServiceLayer,
Geoprocessor,
TextSymbol,
Font,
Graphic,
Point,
SimpleMarkerSymbol,
SimpleLineSymbol,
Color
) {
var printurl = top.Robin.Setting.GlobalSetting.BaseMapServices.Printing.url;
var printTask = new PrintTask(printurl);
var template = new PrintTemplate();
template.exportOptions = {
width: 800,
height: 600,
dpi: 96
};
template.format = "PDF";
template.layout = "MAP_ONLY"; //MAP_ONLY print
template.preserveScale = false;
var params = new PrintParameters();
params.map = top.Robin.Map.Map2DControl;
params.template = template;
printTask.execute(params, function (evt) {
window.open(evt.url, "_blank");
}, function (erro) { alert(erro); });
});
}
</script>
最新文章
- 1、MVC和EF中的 Model First 和 Code First
- [ACM_水题] ZOJ 3712 [Hard to Play 300 100 50 最大最小]
- linux下安装php的imagick扩展模块(附php升级脚本)
- PHP+redis实现超迷你全文检索
- 夺命雷公狗---Thinkphp----10之后台登录.注销一条龙
- ECshop中defined(&#39;IN_ECS&#39;)的实现原理
- PHP中使用CURL实现get和post请求(总结)
- 内联函数inline
- DOS下更改编码方式
- 在项目中使用SQLite数据库小结
- 使用Python实现Hadoop MapReduce程序
- JS 多种变量定义
- 【转载】CSS3 filter:drop-shadow滤镜与box-shadow区别应用
- java报错排解
- win32贪吃蛇实现
- I/O-----字符输入流
- Assembly.LoadFrom加载程序集无法释放资源的解决方案
- php tp3.2生成二维码
- docker常用命令记录
- 20145203盖泽双 《网络对抗技术》实践1—— MAL_逆向与Bof基础