在arcgis javascript 中map地图的div 总是显示高度400的问题
来源:互联网 发布:卷积矩阵运算法则 编辑:程序博客网 时间:2024/05/16 10:18
相关讨论请见:
https://geonet.esri.com/thread/107699
If the map node is being created in a dijit/layout/* node then you can listen once to the ‘resize’ event so you can call map.reposition() and map.resize(). This might not help depending on the css rules so you might have to reset the node size back to 100% and then call reposition and resize. Alternatively you could use dom-geometry.position(…) to get the current node size. However, listening to the ‘resize’ event won’t help if you’re creating the map in just a div node as it won’t have a resize event. To find the parent dijit you can use registry.getEnclosingWidget(…) and pass in the map.root node. This will traverse up the parent dom nodes until it finds a dijit. Then hopefully it will be a dijit with a ‘resize’ event you can listen to once.
解决办法 :
在页面载入后,调用如下js代码,重新进行resize
$(document).ready(function () { resizeDiv();});function resizeDiv() { var vph = $(window).height(); $('#map_div').css({ 'height': vph + 'px', 'width': vpw + 'px' });}
- 在arcgis javascript 中map地图的div 总是显示高度400的问题
- web地图(arcgis for javascript)开发中关于map.resize和map.reposition的bug
- 囧,Javascript中获取与设置DIV高度的问题
- ActionBar中icon总是显示在overflow的问题
- arcgis for javascript 编写的在页面上显示地图的小例子
- Arcgis API for JavaScript在地图上实现手机定位信息的追踪显示
- arcgis for javascript 加载瓦片地图出现显示混乱的问题
- 一个div中定义宽度在其中写一个定义了高度的div显示情况
- ArcGIS For JavaScript API Display map in a dialog(在会话窗口中显示地图)————(七)
- IE6中DIV的默认高度问题
- IE6中DIV的默认高度问题
- div的高度问题
- 如何在ArcGIS Online中构建自己的应用程序模板初级篇-显示地图
- div在IE6与IE7下显示高度不兼容的问题
- 做ArcGis Query result on map例子时,出现查询窗口在地图下一层无法查询的问题
- 让文字在固定高度的div中垂直居中显示
- Firefox中,DIV高度不随子DIV扩展的问题
- DIV高度在IE6下显示变大的修改
- 浙江大华2012笔试题+答案解析
- Docker的网络模式及Pipework工具介绍(转)
- Android(Lollipop/5.0) Material Design(二) 入门指南
- 华为2012.09.03浙大机试题
- ExtJs布局中,控件如何水平居中?
- 在arcgis javascript 中map地图的div 总是显示高度400的问题
- LAD(Log Archive Dest)配置不当引起备份失败
- 黑马程序员——Java基础---IO(一)---IO流概述、字符流、字节流、流操作规律
- 查看microsoft sqlserver2008的端口号
- kafka教程
- 黑马程序员——Java基础---IO(二)--File类、Properties类、打印流、序列流(合并流)
- 在Windows下搭建Android开发环境
- 黑马程序员——Java基础---泛型、集合框架工具类:collections和Arrays
- tomcat服务器虚拟路径配置