map.js 989 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * 显示
  3. */
  4. function countMcsj(e,count,text) {
  5. document.getElementById('bubble_tooltip').style.display = 'none';
  6. var str = text + "已有牧场" + count + "个";
  7. var obj = document.getElementById('bubble_tooltip');
  8. var obj2 = document.getElementById('bubble_tooltip_content');
  9. obj2.innerHTML = str;
  10. obj.style.display = "block";
  11. var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
  12. var x = e.clientX - 88;
  13. var y = e.clientY - obj.offsetHeight -1 + st;
  14. //var x = e.screenX - 100;
  15. //var y = e.screenY - 110;
  16. if (x < 0) {
  17. x = 0;
  18. }
  19. if (y < 0) {
  20. y = 0;
  21. }
  22. obj.style.left = x + "px";
  23. obj.style.top = y + "px";
  24. }
  25. /**
  26. * 无焦点
  27. */
  28. function emptyMcsj() {
  29. document.getElementById('bubble_tooltip').style.display = 'none';
  30. }
  31. /**
  32. * 跳转(目前只开放到省级跳转功能)
  33. */
  34. function loadXjCount(qhbm,count) {
  35. if (count < 1) {
  36. return false;
  37. }
  38. if (qhbm.substring(2) == "0000") {
  39. loadMcMap("",qhbm);
  40. } else {
  41. return false;
  42. }
  43. }