Skip to content

Commit

Permalink
replaced absolute paths with relative paths, to allow placement in su…
Browse files Browse the repository at this point in the history
…bdir
  • Loading branch information
dominiks committed Aug 19, 2015
1 parent 5372537 commit be0b859
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/uristmaps/WorldSites.java
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ public static void geoJson() {
props.put("name", site.getName());
props.put("type", site.getType());
props.put("id", site.getId());
props.put("img", String.format("/icons/%s.png", site.getType().replace(" ", "_").toLowerCase()));
props.put("img", String.format("icons/%s.png", site.getType().replace(" ", "_").toLowerCase()));

// Configure detailed map (if available)
if (sitemaps.containsKey(site.getId())) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/uristmaps/data/SitemapInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public SitemapInfo(int id, int width, int height) {
}

public String getUrl() {
return String.format("/sitemaps/%d.png", siteId);
return String.format("sitemaps/%d.png", siteId);
}

public int getSiteId() {
Expand Down
44 changes: 22 additions & 22 deletions src/main/resources/templates/index.html.vm
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<link href="/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="/css/leaflet.css" type="text/css">
<link rel="stylesheet" href="/css/MarkerCluster.Default.css" type="text/css">
<link rel="stylesheet" href="/css/MarkerCluster.css" type="text/css">
<link rel="stylesheet" href="/css/leaflet-sidebar.min.css" type="text/css">
<link rel="stylesheet" href="/css/urist.css" type="text/css">
<link rel="stylesheet" href="/css/leaflet.groupedlayercontrol.min.css" type="text/css" />
<link href="css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="css/leaflet.css" type="text/css">
<link rel="stylesheet" href="css/MarkerCluster.Default.css" type="text/css">
<link rel="stylesheet" href="css/MarkerCluster.css" type="text/css">
<link rel="stylesheet" href="css/leaflet-sidebar.min.css" type="text/css">
<link rel="stylesheet" href="css/urist.css" type="text/css">
<link rel="stylesheet" href="css/leaflet.groupedlayercontrol.min.css" type="text/css" />

<style>
body {
Expand All @@ -24,27 +24,27 @@
</style>

<!-- Everyone needs it, so here it is -->
<script src="/js/jquery.js" type="text/javascript"></script>
<script src="/js/jquery.tablesorter.min.js" type="text/javascript"></script>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/jquery.tablesorter.min.js" type="text/javascript"></script>

<!-- Oh all the bootstrap -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="/js/bootstrap.min.js"></script>
<script src="js/bootstrap.min.js"></script>

<script src="/js/leaflet.js" type="text/javascript"></script>
<script src="/js/leaflet-sidebar.min.js" type="text/javascript"></script>
<script src="/js/heatmap.min.js" type="text/javascript"></script>
<script src="/js/leaflet-heatmap.js" type="text/javascript"></script>
<script src="/js/leaflet.markercluster.js" type="text/javascript"></script>
<script src="/js/easy-button.js" type="text/javascript"></script>
<script src="/js/leaflet.groupedlayercontrol.min.js" type="text/javascript"></script>
<script src="/js/icons.js" type="text/javascript"></script>
<script src="/js/urist.populations.js" type="text/javascript"></script>
<script src="/js/urist.js" type="text/javascript"></script>
<script src="js/leaflet.js" type="text/javascript"></script>
<script src="js/leaflet-sidebar.min.js" type="text/javascript"></script>
<script src="js/heatmap.min.js" type="text/javascript"></script>
<script src="js/leaflet-heatmap.js" type="text/javascript"></script>
<script src="js/leaflet.markercluster.js" type="text/javascript"></script>
<script src="js/easy-button.js" type="text/javascript"></script>
<script src="js/leaflet.groupedlayercontrol.min.js" type="text/javascript"></script>
<script src="js/icons.js" type="text/javascript"></script>
<script src="js/urist.populations.js" type="text/javascript"></script>
<script src="js/urist.js" type="text/javascript"></script>

<title>$worldInfo.getWorldName() - $worldInfo.getNameEnglish()</title>
</head>
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/templates/js/urist.js.vm
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function init_uristmaps() {
window.layerControl.addOverlay(window.heatmapLayer, "Population", "Overlays");

// Load the sites json containing short info for every site
jQuery.getJSON("/js/sitesgeo.json", process_loaded_sites);
jQuery.getJSON("js/sitesgeo.json", process_loaded_sites);

// Load the regions data
jQuery.getJSON("/js/regionsgeo.json", process_loaded_regions);
jQuery.getJSON("js/regionsgeo.json", process_loaded_regions);

setup_sidebars();
};
Expand All @@ -38,7 +38,7 @@ function init_layer_controls() {

// Create and configure the layers for biome view.
function init_static_layers() {
window.biome_layer = L.tileLayer('/tiles/{z}/{x}/{y}.png', {
window.biome_layer = L.tileLayer('tiles/{z}/{x}/{y}.png', {
noWrap: true,
minZoom: $conf.Map.min_zoom,
maxZoom: $conf.Map.max_zoom,
Expand Down Expand Up @@ -87,7 +87,7 @@ function toggle_detailed_map(site_id) {
window.active_site_maps[site_id] = null;
} else {
// Create the overlay and add it to active_site_maps
var image_url = "/sites/" + site_id + ".png";
var image_url = "sites/" + site_id + ".png";

// the .features object is a list in which the index is resolved as id-1
for (var i = 0; i < window.sites_geojson.features.length; i++) {
Expand Down

0 comments on commit be0b859

Please sign in to comment.