Setting "GEOFFREY_DYNMAP_URL" to none disabled the dynmap iframe

doc_update
Joey Hines 2019-09-29 14:55:28 -05:00
parent e5723e260d
commit 1570264272
3 changed files with 8 additions and 5 deletions

View File

@ -272,7 +272,7 @@ class Location(models.Model):
base_url = getattr(settings, "GEOFFREY_DYNMAP_BASE_URL")
world_name = getattr(settings, "GEOFFREY_DYNMAP_WORLD_NAME")
if base_url is not None:
if base_url:
url = base_url + "/?worldname={}&mapname=surface&zoom=4&x={}&y=65&z={}".format(world_name, self.x_coord,
self.z_coord)
return url

View File

@ -24,9 +24,11 @@
<p>Tunnel: {{ loc.tunnel.tunnel_str }}</p>
{% endif %}
<hr class="my-4">
{% block info %}{% endblock %}
<iframe src="{{ loc.dynmap_url }}" width="100%" height="500">
Your browser does not support iframes.
</iframe>
{% if loc.dynmap %}
{% block info %}{% endblock %} <iframe id="frame" style="visibility: hidden" onload="this.style.visibility = 'visible'" src="{{ loc.dynmap_url }}" width="100%" height="500">
Your browser does not support iframes.
</iframe>
{% endif %}
{% endblock %}

View File

@ -90,6 +90,7 @@ class MarketList(GeoffreyModelList):
class PointOfInterestList(GeoffreyModelList):
model = PointOfInterest
class AttractionList(GeoffreyModelList):
model = Attraction