Skip to content

Commit

Permalink
Adjust CRS
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Oct 11, 2024
1 parent 6dea92d commit 0a4ac3e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion static/coffee/v2_locations.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ $(->
fillOpacity: 1
}

L.CRS.EPSG3857.Pacific = L.CRS.EPSG3857.extend({
wrapLng: [0, 360]
});

# our leaflet options
options = {
# no user controlled zooming
Expand All @@ -40,8 +44,11 @@ $(->

# don't allow dragging
dragging: false
crs: L.CRS.EPSG3857.Pacific
}



initMap = (id, geojson, url, districtZoom, wardZoom) ->
map = L.map(id, options)

Expand Down Expand Up @@ -154,7 +161,6 @@ $(->
states.setStyle(countStyle)
map.addLayer(states)
map.fitBounds(states.getBounds())
map.flyToBounds(states.getBounds())

info.update()

Expand Down

0 comments on commit 0a4ac3e

Please sign in to comment.