|
版本: |
BeX5V3.1 |
小版本号: |
3.3 |
|
|
数据库: |
MySQL |
服务器操作系统: |
Windows |
应用服务器: |
Tomcat |
客户端操作系统: |
Windows 7 |
浏览器: |
Chrome |
|
|
本帖最后由 songhe107 于 2016-1-19 15:53 编辑
在一个对话框中显示高德地图 完全参照《第三方集成案例》里面的 地图集成 做的
对话框中不显示 后台也没有报错
- define(function(require){
- require("css!$UI/system/components/bootstrap/lib/css/bootstrap").load();
- var $ = require("jquery");
- var justep = require("$UI/system/lib/justep");
-
- var Model = function(){
- this.callParent();
- };
- Model.prototype.modelLoad = function(event) {
- this.loadGaodeMap();
- };
-
- Model.prototype.loadGaodeMap = function() {
- var id = this.getIDByXID("gaodeMap");
- window._gaodeInit = function() {
- var map = new AMap.Map(id, {
- resizeEnable : true,
- rotateEnable : true,
- dragEnable : true,
- zoomEnable : true,
- zooms : [ 3, 18 ],
- view : new AMap.View2D({
- center : new AMap.LngLat(116.397428, 39.90923),
- zoom : 12
- })
- });
- };
- require([ 'http://webapi.amap.com/maps?v=1.3&key=6cad10d49f6610516541033XXXXXXXXX&callback=_gaodeInit' ], function() {
- if (window.AMap && window.AMap.Map) {
- window._gaodeInit();
- }
- });
- };
-
- Model.prototype.result = function(){
- //这里实现返回的逻辑
- };
- Model.prototype.OKBtnClick = function(event){
- this.comp('wReceiver').windowEnsure(this.result());
- };
- return Model;
- });
复制代码
W文件结构
|
-
对话框运行
|