first commit
This commit is contained in:
244
MessagesMap/MapTypAll.aspx
Normal file
244
MessagesMap/MapTypAll.aspx
Normal file
@@ -0,0 +1,244 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Standard.Master" CodeBehind="MapTypAll.aspx.cs" Inherits="TALAS_V5.MessagesMap.MapTypAll" %>
|
||||
|
||||
<%@ Register assembly="DevExpress.Web.v19.2, Version=19.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web" tagprefix="dx" %>
|
||||
|
||||
<asp:Content ID="NaviContent" ContentPlaceHolderID="NaviContent" runat="server">
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server" >
|
||||
<script type="text/javascript" src="Scripts/maps.js"></script>
|
||||
<script type="text/javascript" src="Scripts/svg-pan-zoom.js"></script>
|
||||
<script type="text/javascript" src="Scripts/jquery-1.11.1.min.js"></script>
|
||||
<link rel="stylesheet" href="Map.css" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
var offsetH = 1000;
|
||||
var offsetW = 200;
|
||||
|
||||
|
||||
window.addEventListener('beforeunload', function (event) {
|
||||
setViewboxInCookie();
|
||||
});
|
||||
|
||||
window.onload = function () {
|
||||
|
||||
|
||||
if (isMobile.any()) {
|
||||
setHeight();
|
||||
var panZoom = window.panZoom = svgPanZoom('#svgBox', {
|
||||
zoomEnabled: false,
|
||||
controlIconsEnabled: false,
|
||||
dblClickZoomEnabled: false,
|
||||
preventMouseEventsDefault: false,
|
||||
panEnabled: false,
|
||||
fit: 1,
|
||||
center: 1,
|
||||
maxZoom: 100
|
||||
|
||||
});
|
||||
panZoom.resize();
|
||||
panZoom.fit();
|
||||
panZoom.center();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
setHeight();
|
||||
var panZoom = window.panZoom = svgPanZoom('#svgBox', {
|
||||
zoomEnabled: true,
|
||||
controlIconsEnabled: true,
|
||||
fit: 1,
|
||||
center: 1,
|
||||
maxZoom: 100
|
||||
|
||||
});
|
||||
panZoom.resize();
|
||||
panZoom.fit();
|
||||
panZoom.center();
|
||||
|
||||
}
|
||||
getViewboxFromCookie();
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
$(window).resize(function () {
|
||||
if (!isMobile.any()) {
|
||||
setHeight();
|
||||
panZoom.resize();
|
||||
panZoom.fit();
|
||||
panZoom.center();
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
function setHeight() {
|
||||
|
||||
var hScreen = getViewport()[1]-60;
|
||||
var wScreen = getViewport()[0]-80;
|
||||
|
||||
|
||||
var divbox = document.getElementById("sVGcontainer");
|
||||
|
||||
var svg = document.getElementById("svgBox");
|
||||
|
||||
|
||||
if (divbox != null) {
|
||||
divbox.scrollHeight = hScreen;
|
||||
divbox.scrollWidth = wScreen;
|
||||
divbox.setAttribute("height", hScreen);
|
||||
divbox.setAttribute("width", wScreen);
|
||||
}
|
||||
|
||||
if (svg != null) {
|
||||
if (isMobile.any()) {
|
||||
svg.setAttribute("height", hScreen);
|
||||
svg.setAttribute("width", wScreen);
|
||||
}
|
||||
|
||||
else {
|
||||
svg.setAttribute("height", hScreen);
|
||||
svg.setAttribute("width", wScreen);
|
||||
}
|
||||
svg.style.visibility = "visible";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function getViewport() {
|
||||
|
||||
var viewPortWidth;
|
||||
var viewPortHeight;
|
||||
|
||||
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
|
||||
if (typeof window.innerWidth != 'undefined') {
|
||||
viewPortWidth = window.innerWidth,
|
||||
viewPortHeight = window.innerHeight
|
||||
}
|
||||
|
||||
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
|
||||
else if (typeof document.documentElement != 'undefined'
|
||||
&& typeof document.documentElement.clientWidth !=
|
||||
'undefined' && document.documentElement.clientWidth != 0) {
|
||||
viewPortWidth = document.documentElement.clientWidth,
|
||||
viewPortHeight = document.documentElement.clientHeight
|
||||
}
|
||||
|
||||
// older versions of IE
|
||||
else {
|
||||
viewPortWidth = document.getElementsByTagName('body')[0].clientWidth,
|
||||
viewPortHeight = document.getElementsByTagName('body')[0].clientHeight
|
||||
}
|
||||
return [viewPortWidth, viewPortHeight];
|
||||
}
|
||||
|
||||
|
||||
function goLocation(idLocation)
|
||||
{
|
||||
location.href = "../Stations/Location.aspx?id=" + idLocation;
|
||||
}
|
||||
|
||||
function goDistrict(idDistrict)
|
||||
{
|
||||
location.href = "MapTypA.aspx?m=" + (idDistrict*1+1);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="sVGcontainer" style="width: 99%; height: 99%; border:0px solid; border-color:#666666; ">
|
||||
|
||||
<dx:ASPxTimer ID="ViewTimer" runat="server" Interval="10000"
|
||||
ClientIDMode="AutoID">
|
||||
<ClientSideEvents Tick="function(s, e) {
|
||||
|
||||
ctl00_MainContent_ViewTimer.Stop();
|
||||
ctl00_MainContent_AllView.PerformCallback();
|
||||
|
||||
}" />
|
||||
</dx:ASPxTimer>
|
||||
|
||||
|
||||
|
||||
<asp:ObjectDataSource ID="ObjectDataSource3" runat="server" SelectMethod="GetMapAllData" TypeName="TalasLibary.MapClass" >
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="Key" Type="String" />
|
||||
</DeleteParameters>
|
||||
<SelectParameters>
|
||||
<asp:SessionParameter Name="sessionID" SessionField="SessionID" Type="String" />
|
||||
</SelectParameters>
|
||||
</asp:ObjectDataSource>
|
||||
|
||||
|
||||
<% @Import Namespace="System.IO" %>
|
||||
|
||||
<%
|
||||
//ab hier wird die SVG Grafik eingeührt
|
||||
|
||||
StreamReader stmReader;
|
||||
string linkmap = "~/Map/"+(string)Session["MapPath"].ToString() ;
|
||||
|
||||
try
|
||||
{
|
||||
stmReader = File.OpenText(Server.MapPath(linkmap));
|
||||
//Daten auslesen
|
||||
string strLine;
|
||||
while (null != (strLine = stmReader.ReadLine()))
|
||||
{
|
||||
Response.Write(strLine + "\r\n");
|
||||
}
|
||||
stmReader.Close();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
Response.Write("<center><br/><br/><p class='Title'>Die SVG-Karte mit dem Pfad '"+linkmap+"' kann vom Server nicht geladen werden!\r\n</p>");
|
||||
}
|
||||
|
||||
//bis hier SVG Karte
|
||||
%>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div style="visibility:hidden">
|
||||
|
||||
|
||||
<dx:ASPxGridView ID="AllView" runat="server" AutoGenerateColumns="False"
|
||||
CssFilePath="~/App_Themes/Office2010Silver/{0}/styles.css" CssPostfix="Office2010Silver"
|
||||
OnCustomCallback="AllView_CustomCallback"
|
||||
Width="200px" Font-Size="0.1pt"
|
||||
DataSourceID="ObjectDataSource3" ClientIDMode="AutoID"
|
||||
xmlns:dx="devexpress.web.aspxtimer" settingspager-pagesize="100">
|
||||
|
||||
|
||||
<SettingsText CommandDelete="Parameter" /> <ClientSideEvents EndCallback="function(s, e) {
|
||||
ctl00_MainContent_ViewTimer.Start();
|
||||
updateAll();
|
||||
}" Init="function(s, e) {
|
||||
initAll();
|
||||
}" /> <SettingsLoadingPanel Mode="Disabled" /> <StylesEditors ButtonEditCellSpacing="0"> <ProgressBar Height="21px"> </ProgressBar> </StylesEditors> <Settings ShowVerticalScrollBar="false"
|
||||
ShowStatusBar="Hidden" /> <Columns>
|
||||
<dx:GridViewDataTextColumn Caption="Id" FieldName="id" VisibleIndex="0"> </dx:GridViewDataTextColumn>
|
||||
<dx:GridViewDataTextColumn Caption="Destination" FieldName="destination" VisibleIndex="1"> </dx:GridViewDataTextColumn>
|
||||
<dx:GridViewDataTextColumn Caption="Text" FieldName="text" VisibleIndex="2"> </dx:GridViewDataTextColumn>
|
||||
<dx:GridViewDataTextColumn Caption="Color" FieldName="color" VisibleIndex="3"> </dx:GridViewDataTextColumn>
|
||||
<dx:GridViewDataTextColumn Caption="Count" FieldName="count" VisibleIndex="4"> </dx:GridViewDataTextColumn>
|
||||
</Columns> <SettingsPager PageSize="1000" Visible="false" /> </dx:ASPxGridView>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
Reference in New Issue
Block a user