Server configuration
This commit is contained in:
@@ -1 +0,0 @@
|
||||
<%@ WebService Language="C#" CodeBehind="WebServiceMap.asmx.cs" Class="TALAS_V5.WebService1" %>
|
||||
@@ -1,118 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Services;
|
||||
using Newtonsoft.Json;
|
||||
using System.Data;
|
||||
using System.Data.Odbc;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
||||
namespace TALAS_V5
|
||||
{
|
||||
/// <summary>
|
||||
/// Zusammenfassungsbeschreibung für WebService1
|
||||
/// </summary>
|
||||
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
|
||||
[System.ComponentModel.ToolboxItem(false)]
|
||||
// Wenn der Aufruf dieses Webdiensts aus einem Skript zulässig sein soll, heben Sie mithilfe von ASP.NET AJAX die Kommentarmarkierung für die folgende Zeile auf.
|
||||
[System.Web.Script.Services.ScriptService]
|
||||
public class WebService1 : System.Web.Services.WebService
|
||||
{
|
||||
|
||||
[WebMethod]
|
||||
public string Test1()
|
||||
{
|
||||
return "Hier steht ein Beispieltext "+DateTime.Now.ToLongTimeString();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public string Test2()
|
||||
{
|
||||
MapPoints mps = new MapPoints();
|
||||
LoadAllPoints(out mps);
|
||||
//return "Hier steht ein Beispieltext " + DateTime.Now.ToLongTimeString();
|
||||
return JsonConvert.SerializeObject(mps, Formatting.Indented);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void LoadAllPoints(out MapPoints mps)
|
||||
{
|
||||
MapPoint mp;
|
||||
|
||||
mps = new MapPoints();
|
||||
mp = new MapPoint();
|
||||
|
||||
using (OdbcConnection con = new OdbcConnection(TalasLibary.SqlHelper.SqlConnectionString()))
|
||||
{
|
||||
OdbcCommand dataCommand = new OdbcCommand();
|
||||
OdbcDataReader dataReader;
|
||||
con.Open();
|
||||
dataCommand.Connection = con;
|
||||
dataCommand.CommandText = string.Format("SELECT b.STO_NAME, b.BER_NR, b.REFERENZ, POS_X, POS_Y");
|
||||
dataCommand.CommandText += string.Format(" FROM stsisy_bereiche as b");
|
||||
dataCommand.CommandText += string.Format(" LEFT JOIN stsisy_Ber_koord as k on b.BER_NR=k.BER_NR");
|
||||
dataCommand.CommandText += string.Format(" WHERE LENGTH(REFERENZ)>0 and POS_X>0 and POS_Y>0 LIMIT 100");
|
||||
|
||||
dataReader = dataCommand.ExecuteReader();
|
||||
|
||||
|
||||
while (dataReader.Read())
|
||||
{
|
||||
|
||||
mp = new MapPoint();
|
||||
|
||||
|
||||
if (dataReader.IsDBNull(0))
|
||||
mp.Name = "unbekannt";
|
||||
else
|
||||
mp.Name = dataReader.GetString(0);
|
||||
mp.Name=mp.Name.Replace('"', ' ');
|
||||
|
||||
if (dataReader.IsDBNull(2))
|
||||
mp.Short = "unbekannt";
|
||||
else
|
||||
mp.Short = dataReader.GetString(2);
|
||||
|
||||
if (dataReader.IsDBNull(3))
|
||||
mp.x = 0;
|
||||
else
|
||||
mp.x = dataReader.GetDouble(3);
|
||||
|
||||
if (dataReader.IsDBNull(4))
|
||||
mp.y = 0;
|
||||
else
|
||||
mp.y = dataReader.GetDouble(4);
|
||||
|
||||
mps.Points.Add(mp);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//return mps;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class MapPoint
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Short { get; set; }
|
||||
|
||||
public double x { get; set; }
|
||||
public double y { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class MapPoints
|
||||
{
|
||||
public string Name = "Liste aller Bereiche";
|
||||
public DateTime Zeitstempel = DateTime.Now;
|
||||
public List<MapPoint> Points = new List<MapPoint>();
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Standard.Master" AutoEventWireup="true" CodeBehind="MapTypC.aspx.cs" Inherits="TALAS_V5.MessagesMap.MapTypC" %>
|
||||
<%@ 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">
|
||||
|
||||
<style>
|
||||
.responsive-iframe-wrapper {
|
||||
position: relative !important;
|
||||
width: 100% !important;
|
||||
height: 97.2vh !important; /* Setzt die Höhe des Wrappers auf die Höhe des Viewports */
|
||||
overflow: hidden !important; /* Verhindert Scrollbalken innerhalb des Wrappers */
|
||||
padding: 0 0 0 0 !important;
|
||||
margin: 0 0 0 0 !important;
|
||||
}
|
||||
.responsive-iframe-wrapper iframe {
|
||||
position: absolute !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border: none !important; /* Removes the border */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="responsive-iframe-wrapper">
|
||||
<iframe frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var url = new URL(window.location.href);
|
||||
var mValue = url.searchParams.get("m");
|
||||
var uValue = url.searchParams.get("u");
|
||||
|
||||
// Setzen der src-Eigenschaft des iframe mit den abgerufenen Parametern
|
||||
document.querySelector('.responsive-iframe-wrapper iframe').src =
|
||||
// "http://10.10.0.70:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||
"http://10.10.0.13:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||
});
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -1,46 +0,0 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Standard.Master" AutoEventWireup="true" CodeBehind="MapTypC.aspx.cs" Inherits="TALAS_V5.MessagesMap.MapTypC" %>
|
||||
<%@ 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">
|
||||
|
||||
<style>
|
||||
.responsive-iframe-wrapper {
|
||||
position: relative !important;
|
||||
width: 100% !important;
|
||||
height: 95vh !important; /* Setzt die Höhe des Wrappers auf die Höhe des Viewports */
|
||||
overflow: hidden !important; /* Verhindert Scrollbalken innerhalb des Wrappers */
|
||||
padding: 0 0 0 0 !important;
|
||||
margin: 0 0 0 0 !important;
|
||||
}
|
||||
.responsive-iframe-wrapper iframe {
|
||||
position: absolute !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border: none !important; /* Removes the border */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="responsive-iframe-wrapper">
|
||||
<iframe frameborder="0"></iframe>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var url = new URL(window.location.href);
|
||||
var mValue = url.searchParams.get("m");
|
||||
var uValue = url.searchParams.get("u");
|
||||
|
||||
// Setzen der src-Eigenschaft des iframe mit den abgerufenen Parametern
|
||||
document.querySelector('.responsive-iframe-wrapper iframe').src =
|
||||
// "http://10.10.0.70:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||
"http://10.10.0.13:3000?m=" + encodeURIComponent(mValue) + "&u=" + encodeURIComponent(uValue);
|
||||
});
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
1924
components/MapComponent home.js
Normal file
1924
components/MapComponent home.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@ import { poiReadFromDbTriggerAtom } from "../store/atoms/poiReadFromDbTriggerAto
|
||||
import { InformationCircleIcon } from "@heroicons/react/20/solid"; // oder 'outline'
|
||||
import PoiUpdateModal from "./PoiUpdateModal.js";
|
||||
import { selectedPoiState } from "../store/atoms/poiState.js";
|
||||
import { currentPoiState } from '../store/atoms/currentPoiState';
|
||||
import { currentPoiState } from "../store/atoms/currentPoiState";
|
||||
|
||||
//import { createRoot } from "react-dom/client";
|
||||
|
||||
@@ -35,7 +35,6 @@ const plusRoundIcon = L.icon({
|
||||
});
|
||||
|
||||
const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
|
||||
const setSelectedPoi = useSetRecoilState(selectedPoiState);
|
||||
|
||||
const openPoiUpdateModal = () => setShowPoiUpdateModal(true);
|
||||
@@ -60,7 +59,6 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
});
|
||||
console.log("POI-Daten1:", currentPoiData);
|
||||
|
||||
|
||||
fetchPoiData(marker.options.id);
|
||||
|
||||
setShowPoiUpdateModal(true);
|
||||
@@ -901,7 +899,10 @@ useEffect(() => {
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> 1a87c21 (Server configuration)
|
||||
const fetchDeviceNameById = async (idLD) => {
|
||||
try {
|
||||
const response = await fetch(`/api/locationDeviceNameById?idLD=${idLD}`);
|
||||
@@ -918,6 +919,11 @@ useEffect(() => {
|
||||
};
|
||||
|
||||
//------------------------------------------
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
//------------------------------------------
|
||||
>>>>>>> 1a87c21 (Server configuration)
|
||||
// poiLayerRef(poiDbLayer) POI hinzufügen
|
||||
//--------------------------------------------
|
||||
|
||||
@@ -935,6 +941,10 @@ useEffect(() => {
|
||||
//console.log("location.idPoiTyp poiLayer:", location.idPoiTyp);
|
||||
console.log("location.idPoiTyp poiLayer:", location);
|
||||
console.log("location.idPoiTyp:", location.idPoiTyp);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> 1a87c21 (Server configuration)
|
||||
const deviceName = await fetchDeviceNameById(location.idLD);
|
||||
const marker = L.marker([latitude, longitude], {
|
||||
icon: L.icon({
|
||||
@@ -963,7 +973,11 @@ useEffect(() => {
|
||||
marker.bindPopup(`
|
||||
<div>
|
||||
<b class="text-xl text-black-700">${location.description || "Unbekannt"}</b><br>
|
||||
<<<<<<< HEAD
|
||||
${deviceName}<br> <!-- Gerät:-->
|
||||
=======
|
||||
${deviceName}<br> <!-- Gerät:-->
|
||||
>>>>>>> 1a87c21 (Server configuration)
|
||||
${poiTypName}<br> <!-- Typ:-->
|
||||
</div>
|
||||
`);
|
||||
@@ -991,8 +1005,11 @@ useEffect(() => {
|
||||
setCurrentPoi(location);
|
||||
console.log("POI-Daten currentPoi:", currentPoi);
|
||||
//console.log("poiData in MapComponent.js:", poiData);
|
||||
<<<<<<< HEAD
|
||||
|
||||
>>>>>>> b983067 (Prepair: With Recoil atom pass current poi data from MapComponent to poiUpdateModal.js when mouse over)
|
||||
=======
|
||||
>>>>>>> 1a87c21 (Server configuration)
|
||||
});
|
||||
marker.on("mouseout", function () {
|
||||
this.closePopup();
|
||||
|
||||
@@ -30,7 +30,11 @@ if (typeof window !== "undefined") {
|
||||
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${c}&idUser=${user}`;
|
||||
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`;
|
||||
|
||||
<<<<<<< HEAD
|
||||
/* mapGisStationsStaticDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict`;
|
||||
=======
|
||||
/* mapGisStationsStaticDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict`;
|
||||
>>>>>>> 1a87c21 (Server configuration)
|
||||
mapGisStationsStatusDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStatusDistrict`;
|
||||
mapGisStationsMeasurementsUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements`;
|
||||
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic`;
|
||||
|
||||
Reference in New Issue
Block a user