mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 17:58:24 -04:00
Refactor coordinate processing into Polygons class
We have a bunch of stuff for doing lat/long transformation in the `BroadcastMessage` class. This is not a good separation of concerns, now that we have a separate class for dealing with polygons and coordinates.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(mymap);
|
||||
|
||||
{% for polygon in broadcast_message.simple_polygons.bleed.as_coordinate_pairs %}
|
||||
{% for polygon in broadcast_message.simple_polygons.bleed.as_coordinate_pairs_lat_long %}
|
||||
polygons.push(
|
||||
L.polygon({{polygon}}, {
|
||||
opacity: 0.5,
|
||||
@@ -48,7 +48,7 @@
|
||||
);
|
||||
{% endfor %}
|
||||
|
||||
{% for polygon in broadcast_message.simple_polygons.as_coordinate_pairs %}
|
||||
{% for polygon in broadcast_message.simple_polygons.as_coordinate_pairs_lat_long %}
|
||||
polygons.push(
|
||||
L.polygon({{polygon}}, {
|
||||
opacity: 0.1,
|
||||
@@ -60,7 +60,7 @@
|
||||
);
|
||||
{% endfor %}
|
||||
|
||||
{% for polygon in broadcast_message.polygons.as_coordinate_pairs %}
|
||||
{% for polygon in broadcast_message.polygons.as_coordinate_pairs_lat_long %}
|
||||
polygons.push(
|
||||
L.polygon({{polygon}}, {
|
||||
color: '#0b0b0c', // $black
|
||||
|
||||
Reference in New Issue
Block a user