为了处理adf中关于Maptips的各种棘手问题,我前段时间没少费心血。为了感谢各位朋友的支持,今天我就把整理好的关于如何处理Maptips的技巧和方法贴出来,相信识货的朋友会喜欢滴! 一、如何处理 Maptips 被 map image 遮挡的情况? 当在模板生成的web map application中加入自己的floatpannel等对象时会引起页面对象Z-index的排序,会造成Maptips弹出信息框被map image遮挡的情况,最直接的解决办法:将PageContent div的z-index设值为0即OK。 二、如何修改或取消默认的Maptips图标?——且保留Maptips功能 查看Maptips属性,找到对应的图标文件(一共3个,分别对应于——默认状态、鼠标停留、鼠标点击),然后用Photoshop将这些图标文件修改成透明的gif文件,如此以来,即可保留Maptips功能,又不会因为Maptips图标遮挡原本的图层符号,这在涉及专题图显示的应用中非常有用! 三、如何修改Maptips弹出信息框样式? 1. Change the UseDefaultWebResources property of the maptips control to "False" 2. Copy the "display_maptips.js" file in the "aspnet_client/ESRI/WebADF/JavaScript" directory to the Javascript folder of the web application 3. Change the line in your display_maptips.js (inside of the new folder you just copied to) 4. Register this script in the html source of the mapping application page (default.aspx usually). I put the following line right after the beginning form tag... 5. Copy the maptips.css file from the "aspnet_client/ESRI/WebADF/styles" folder to the root folder of your web site (or anywhere you want, you just have to modify the css link in the page) 6. Modify the css file changing the "ADF_" prefixes to "Custom_" prefixes 7. Add the link to this stylesheet in the "head" section of the html source of the mapping application page 8. Now all thats left is to modify the copied maptips.css file (in the mapping app directory) with the changes you want! 我按如此步骤之后,可以任意定制自己的Maptips了,希望能对朋友们有所帮助。 四、如何将maptips弹出信息框中的click icon fpr more information改成自己内容?——注意编码问题!! 修改display_maptips.js文件,将click icon fpr more information等提示信息修改成自己的,保存即可。 |
关于处理Maptips的技巧和方法总结
《推荐》关于处理Maptips的技巧和方法总结——2008年1月7日 效果截图已更新!!!
2007-12-06 00:21
|