Skip to content

Commit

Permalink
Merge branch '637-markers' of https://github.com/hbz/nwbib
Browse files Browse the repository at this point in the history
  • Loading branch information
fsteeg committed Jan 25, 2024
2 parents a2a7b73 + 935ee77 commit cb222a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/views/tags/items_map.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

<link rel="stylesheet" href="@controllers.routes.Assets.at("stylesheets/leaflet.css")" />
<script src="@controllers.routes.Assets.at("javascripts/leaflet.js")"></script>
<script src="@controllers.routes.Assets.at("javascripts/Leaflet.MakiMarkers.js")"></script>
@*<script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.2.4"></script>*@
<table class="table table-striped table-condensed">
<tr>
Expand Down Expand Up @@ -90,7 +89,12 @@
var lat = @string((json \\ "lat").head)
var lon = @string((json \\ "lon").head)
var latlng@(id) = L.latLng(lat, lon);
var icon@(id) = L.MakiMarkers.icon({icon: "library", color: "#FF333B", size: "m"});
var icon@(id) = L.icon({
iconUrl: '@controllers.routes.Assets.at("javascripts/images/marker-icon-red.png")',
iconSize: [20, 30],
iconAnchor: [10, 30],
popupAnchor: [0, -30]
});
var marker@(id) = L.marker([lat, lon],{
title: "@ownerName (@key)",
icon: icon@(id)
Expand All @@ -110,7 +114,7 @@
zoomDetails@(id)();
}
function zoomDetails@(id)() {
map.setView(latlng@(id), 16);
map.setView(latlng@(id), 17);
marker@(id).openPopup();
}
function bindPopup@(id)(content) {
Expand Down
Binary file added public/javascripts/images/marker-icon-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cb222a0

Please sign in to comment.