|
@@ -368,11 +368,34 @@ function initMap() {
|
|
|
map.setDefaultCursor("default");
|
|
|
map.setDraggingCursor("default")
|
|
|
}
|
|
|
+
|
|
|
+callbackGoogle = function (data) {
|
|
|
+ if (data.status === 0) {
|
|
|
+ var value = data.points[0].lng + "," + data.points[0].lat;
|
|
|
+ Fe.G("googlePointInput").value = value;
|
|
|
+ Fe.G('googlePointInput').setAttribute('data-clipboard-text', value);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+callbackMars = function (data) {
|
|
|
+ if (data.status === 0) {
|
|
|
+ var value = data.points[0].lng + "," + data.points[0].lat;
|
|
|
+ Fe.G("marsPointInput").value = value;
|
|
|
+ Fe.G('marsPointInput').setAttribute('data-clipboard-text', value);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
function setInputPoint(a) {
|
|
|
var value = a.lng + "," + a.lat;
|
|
|
+ var point = new BMap.Point(a.lng, a.lat);
|
|
|
+ var convertor = new BMap.Convertor();
|
|
|
+ // convertor.translate(point, 5,3, callbackGoogle);
|
|
|
+ convertor.translate(point, 5,3, callbackMars);
|
|
|
+
|
|
|
Fe.G("pointInput").value = value;
|
|
|
Fe.G('pointInput').setAttribute('data-clipboard-text', value);
|
|
|
}
|
|
|
+
|
|
|
function createMouseMoveLabel(c) {
|
|
|
var a = map.pixelToPoint(new BMap.Pixel(0, 0));
|
|
|
var b = c.lng + "," + c.lat;
|
|
@@ -715,7 +738,7 @@ function bindEvent() {
|
|
|
}
|
|
|
function addMarker(a) {
|
|
|
var b = temp.pt[a];
|
|
|
- var d = new BMap.Icon("Images/markers.png", new BMap.Size(23, 25), {
|
|
|
+ var d = new BMap.Icon("images/markers.png", new BMap.Size(23, 25), {
|
|
|
offset: new BMap.Size(10, 25),
|
|
|
imageOffset: new BMap.Size(0, 0 - a * 25),
|
|
|
infoWindowAnchor: new BMap.Size(12, 0)
|
|
@@ -849,54 +872,22 @@ function showMessage(b) {
|
|
|
1000)
|
|
|
}
|
|
|
function createCopyBt() {
|
|
|
- // M.fe.copy({
|
|
|
- // copyBtnId: "copyPoint",
|
|
|
- // copytextId: "pointInput",
|
|
|
- // copyTag: "value",
|
|
|
- // callback: function(d) {
|
|
|
- // var c = Fe.G("copyMessage");
|
|
|
- // c.style.display = "inline-block";
|
|
|
- // setTimeout(function() {
|
|
|
- // c.style.display = "none"
|
|
|
- // },
|
|
|
- // 1000)
|
|
|
- // }
|
|
|
- // });
|
|
|
- // var a = setInterval(function() {
|
|
|
- // if (Fe.G("ZeroClipboardMovie_1")) {
|
|
|
- // var c = getAbsPoint(Fe.G("copyButton"));
|
|
|
- // if (baidu.browser.ie == 8) {
|
|
|
- // baidu.dom.getParent(Fe.G("ZeroClipboardMovie_1")).style.top = (c.y + 25) + "px";
|
|
|
- // baidu.dom.getParent(Fe.G("ZeroClipboardMovie_1")).style.left = (c.x + 170) + "px"
|
|
|
- // } else {
|
|
|
- // if (baidu.browser.ie < 8) {
|
|
|
- // baidu.dom.getParent(Fe.G("ZeroClipboardMovie_1")).style.top = (c.y - 10) + "px";
|
|
|
- // baidu.dom.getParent(Fe.G("ZeroClipboardMovie_1")).style.left = (c.x + 10) + "px"
|
|
|
- // } else {
|
|
|
- // baidu.dom.getParent(Fe.G("ZeroClipboardMovie_1")).style.top = (c.y + 6) + "px";
|
|
|
- // baidu.dom.getParent(Fe.G("ZeroClipboardMovie_1")).style.left = (c.x + 11) + "px"
|
|
|
- // }
|
|
|
- // }
|
|
|
- // clearInterval(a)
|
|
|
- // }
|
|
|
- // },
|
|
|
- // 1000);
|
|
|
if (!document.all) {
|
|
|
- Fe.G("copyButton").style.top = "-9px";
|
|
|
- Fe.G("copyButton").style.left = "5px"
|
|
|
+ Fe.G("baiduCopyButton").style.top = "-9px";
|
|
|
+ Fe.G("baiduCopyButton").style.left = "5px"
|
|
|
}
|
|
|
if (baidu.browser.ie >= 8) {
|
|
|
- Fe.G("copyButton").style.top = "-22px";
|
|
|
- Fe.G("copyButton").style.left = "5px"
|
|
|
+ Fe.G("baiduCopyButton").style.top = "-22px";
|
|
|
+ Fe.G("baiduCopyButton").style.left = "5px"
|
|
|
}
|
|
|
var b = navigator.userAgent.toLowerCase();
|
|
|
if ((/mozilla/.test(b)) && (!/(compatible|webkit)/.test(b))) {
|
|
|
- Fe.G("copyButton").style.top = "-22px";
|
|
|
- Fe.G("copyButton").style.left = "5px"
|
|
|
+ Fe.G("baiduCopyButton").style.top = "-22px";
|
|
|
+ Fe.G("baiduCopyButton").style.left = "5px"
|
|
|
}
|
|
|
|
|
|
// 绑定复制功能
|
|
|
- // Fe.G("copyButton").addEventListener('click', function() {
|
|
|
+ // Fe.G("baiduCopyButton").addEventListener('click', function() {
|
|
|
// console.log('-0-0-0-0-0-0')
|
|
|
// copyTextByCB();
|
|
|
// });
|
|
@@ -915,7 +906,7 @@ function copyTextByCB() {
|
|
|
}
|
|
|
|
|
|
// var clipboard = new Clipboard('#copyPoint');
|
|
|
- var clipboard = new Clipboard('#copyButton');
|
|
|
+ var clipboard = new Clipboard('#baiduCopyButton');
|
|
|
|
|
|
clipboard.on('success', function(e) {
|
|
|
e.clearSelection();
|