Skip to content

Commit

Permalink
Minor updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Aug 4, 2024
1 parent 82a36cd commit 4a38f23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions app/dmweb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,10 @@ subroutine route_map(env)

! Output inline script to create Leaflet map.
call dm_cgi_out(H_SCRIPT)
call dm_cgi_out('const id = ''' // MAP_ID // ''';')
call dm_cgi_out('const url = ''' // trim(tile_url) // ''';')
call dm_cgi_out('const lon = ' // dm_ftoa(lon) // ';')
call dm_cgi_out('const lat = ' // dm_ftoa(lat) // ';')
call dm_cgi_out('const id = "' // MAP_ID // '";')
call dm_cgi_out('const url = "' // trim(tile_url) // '";')
call dm_cgi_out('const lon = ' // dm_ftoa(lon) // ';')
call dm_cgi_out('const lat = ' // dm_ftoa(lat) // ';')
call dm_cgi_out('const zoom = 5;')
call dm_cgi_out('const features = [')

Expand Down
8 changes: 4 additions & 4 deletions share/dmweb/dmpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function createMap(id, url, lon, lat, zoom, features)
{
const options = { attributionControl: false };
const view = { lat: lat, lng: lon };
const maxZoom = 19;
const maxZoom = 22;
const map = L.map(id, options).setView(view, zoom);

L.tileLayer(url, { maxZoom: maxZoom }).addTo(map);
Expand All @@ -34,11 +34,11 @@ function onEachFeature(feature, layer)
{
let content = '';

if (feature.properties && feature.properties.data)
if (feature.properties && features.properties.type && feature.properties.data)
{
if (feature.properties.data.name)
{
content += `<strong>${feature.properties.data.name}</strong><br>`;
content += `<strong>${feature.properties.data.name}</strong> (${feature.properties.type})<br>`;
}

if (feature.properties.data.meta)
Expand Down Expand Up @@ -73,7 +73,7 @@ function pointToLayer(feature, latlng)
options.fillColor = "crimson";
break;
case 'target':
options.fillColor = "seagreen";
options.fillColor = "chartreuse";
break;
}

Expand Down

0 comments on commit 4a38f23

Please sign in to comment.