mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Make sure OSM map is not enabled in test environment in case it abuses OSM tile servers
This commit is contained in:
@@ -71,6 +71,11 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
#displayMap() {
|
||||
// Don't initialise map in test environment because that could possibly abuse OSM tile servers
|
||||
if(process.env.RAILS_ENV == "test") {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.map = L.map('open-street-map')
|
||||
L.tileLayer.provider(this.providerNameValue, this.providerOptionsValue).addTo(this.map)
|
||||
this.map.setView([this.defaultLatitudeValue, this.defaultLongitudeValue], this.zoomLevel)
|
||||
|
||||
Reference in New Issue
Block a user