SVG做的地图在EDGE浏览器中不显示,谷歌、IE、火狐都能正常加载

qq_28054957 2016-08-06 01:22:52
页面代码

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Floorplan.aspx.cs" Inherits="ForTest.Floorplan" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/raphael.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">


<div class="container floorplan-div" id="main">

<div class="map-box" style="padding: 10px; background: rgb(238, 238, 238)">
<div style="width: <%=strwidth%>; height: <%=strheight%>" id="mapsvg-other-cont">
<div id="mapsvg-other" style="margin-left: auto; margin-right: auto; position: absolute"></div>
</div>
</div>
</div>
<script src="js/jquery.mousewheel.js" type="text/javascript"></script>
<script src="js/mapsvg.js" type="text/javascript"></script>
<script type="text/javascript">

function iosvalues(storid) {
window.location = "ios:storeDetail:" + storid;
}
function loadmap() {
var file = '<%=svgfile%>';
var svgurl = '<%=svgURL%>';

if ($('#mapsvg-other').find('svg').length) {
$('#mapsvg-other').empty().mapSvg().destroy();
}

var mapClicked = function (touchEvent, methods) {
{
methods.showTip.call(this, this.id);
var s = this.tooltip;

if (window.parent.location.href.indexOf("action") > 0) {
return false;
}
if ($(this.tooltip).find("a").length) {
if ('<%=strOSVersion%>' == '2') {
} else {
parent.location.href = $(this.tooltip).find("a").attr("href");
}
}
}
};
var tooltipsOptions = {};
$('#mapsvg-other').mapSvg({
source: 'maps/' + svgurl,
responsive: 1,
cursor: "pointer",
zoomLimit: [0, 12],
popover: {
width: 162,
height: 228
},
colors: {
stroke: "#999999",
hover: "#622aff",
selected: "#622aff"
},
zoomButtons: {
'show': true,
'location': 'left'
},
onClick: mapClicked,
mouseOver: function (event, mapsvg) {
if ('<%=svgfile%>' == 'OakvillePlacemap.svg') {
if (this.name == "polygon5033") {

mapsvg.highlightRegion('polygon4797');
}
else {
if (this.name != "polygon4797")
mapsvg.unhighlightRegion('polygon4797');
}
if (this.name == "polygon4797") {

mapsvg.highlightRegion('polygon5033');
}
else {
if (this.name != "polygon5033")
mapsvg.unhighlightRegion('polygon5033');
}
if (this.name == "polygon5029") {

mapsvg.highlightRegion('polygon5025');
}
else {
if (this.name != "polygon5025")
mapsvg.unhighlightRegion('polygon5025');
}
if (this.name == "polygon5025") {

mapsvg.highlightRegion('polygon5029');
}
else {
if (this.name != "polygon5029")
mapsvg.unhighlightRegion('polygon5029');
}
}
},

mouseOut: function (event, mapsvg) {
if ('<%=svgfile%>' == 'OakvillePlacemap.svg') {
mapsvg.unhighlightRegion('polygon4797');
mapsvg.unhighlightRegion('polygon5033');
mapsvg.unhighlightRegion('polygon5025');
mapsvg.unhighlightRegion('polygon5029');
}
},
<%=strviewBox%>

marks:
[
{
xy: [<%=strx%>, <%=stry%>],
attrs: { 'src': 'markers/mappin_oakville_on.png' }
}
],
regions: {
<%=strregions%>
},
width: $('svg').width(),
keepSourceStyles: true,
tooltips: tooltipsOptions,
tooltipsMode: 'custom',
zoom: true,
pan: true
});
}
loadmap();
</script>
</asp:Content>

...全文
257 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_28054957 2016-08-06
  • 打赏
  • 举报
回复
http://albioncentre.local.imcba.cn/Floorplan.aspx 这个网址是我们已经上线的项目
qq_28054957 2016-08-06
  • 打赏
  • 举报
回复
后台代码以验证,无问题存在

87,901

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧