Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions public/example_templates/netjsonmap-appendData.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,49 @@
<!-- theme can be easily customized via css -->
<link href="../lib/css/netjsongraph-theme.css" rel="stylesheet" />
<link href="../lib/css/netjsongraph.css" rel="stylesheet" />
<style>
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
#map-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div
id="info-banner"
style="
position: fixed;
top: 10px;
left: 50%;
transform: translateX(-50%);
background: rgba(52, 73, 94, 0.95);
color: white;
padding: 12px 20px;
border-radius: 8px;
font-size: 14px;
z-index: 1000;
max-width: 90%;
text-align: center;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
"
>
<strong>JSONDataUpdate - Append Mode:</strong> This example demonstrates
appending new data to existing map data based on zoom level. <br /><em
>Try zooming in to level 4 to see additional nodes being added to the
map.</em
>
</div>
<div id="map-container"></div>
<script type="text/javascript">
/*
The demo is used to show how to use the `JSONDataUpdate` function to update data.
Expand All @@ -28,6 +69,7 @@
4: "2.json",
},
map = new NetJSONGraph("../assets/data/netjsonAppendData/1.json", {
el: "#map-container",
render: "map",
// set map initial state.
mapOptions: {
Expand Down
Loading