After successfully resolving an issue on my localhost following this particular problem, I encountered difficulties when attempting to integrate the map into our web application.
EDIT: The javascript array appears empty in the source code of the rendered page (indicating that the markers1 / markers2 strings are also empty).
Continuing from a previous inquiry:
I am aiming to showcase a map populated with an array of markers using OSM and the OpenLayers Library. While static values function without issues, the challenge arises when trying to display SQL table-based markers. What is the optimal method for extracting data and populating it within the JS array?
Below is the provided code snippet:
inclined towards reaching
In addition to my code, here is the markup containing the necessary JavaScript to render the map:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="fibre.aspx.cs" Inherits="fibre" %>
<asp:Content ID="cntChart" ContentPlaceHolderID="CPH_visual1" Runat="Server">
<asp:Literal ID="Literalsingle" runat="server"></asp:Literal>
<div id="mapdiv" style="height: 100%; position: relative;">
<!-- map will render here! -->
</div>
<!-- map built with OpenLayers api on OpenStreetMap -->
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script>
// JS script content goes here
</script>
</asp:Content>
Any insights on why this setup might be failing? Your assistance is much appreciated!