+
+
-
© Mapbox, © OpenStreetMap. Improve this map.
);
- }*/}
+ }
+
+ // only request map image if the user looks at the photo information
+ // this is to reduce requests to the api
+ try {
+ document.getElementsByClassName('photoInformation')[0].onmouseover = () => {
+ setPhotoMap(true);
+ }
+ } catch (e) {}
return (
@@ -129,7 +129,7 @@ export default function PhotoInformation({ info, url, api }) {
{variables.language.getMessage(variables.languagecode, 'widgets.background.information')}
- {/*photoMap()*/}
+ {photoMap()}
{/* fix console error by using fragment and key */}
{info.location && info.location !== 'N/A' ?
diff --git a/src/modules/constants.js b/src/modules/constants.js
index c46c3773..7d497165 100644
--- a/src/modules/constants.js
+++ b/src/modules/constants.js
@@ -5,14 +5,14 @@ export const MARKETPLACE_URL = 'https://marketplace.muetab.com';
export const SPONSORS_URL = 'https://sponsors.muetab.com';
export const GITHUB_URL = 'https://api.github.com';
export const DDG_IMAGE_PROXY = 'https://external-content.duckduckgo.com/iu/?u=';
-//export const MAPBOX_URL = 'https://api.mapbox.com';
+export const MAPBOX_URL = 'https://api.mapbox.com';
+export const OPENSTREETMAP_URL = 'https://www.openstreetmap.org';
// Mue URLs
export const WEBSITE_URL = 'https://muetab.com';
export const PRIVACY_URL = 'https://muetab.com/privacy';
export const BLOG_POST = 'https://blog.muetab.com/posts/version-6-0';
export const TRANSLATIONS_URL = 'https://docs.muetab.com/translations/';
-export const CDN_URL = 'https://res.cloudinary.com/mue/image/upload';
// Mue Info
export const ORG_NAME = 'mue';
diff --git a/src/modules/helpers/background/widget.js b/src/modules/helpers/background/widget.js
index 046a437e..9f34b98c 100644
--- a/src/modules/helpers/background/widget.js
+++ b/src/modules/helpers/background/widget.js
@@ -72,12 +72,3 @@ export function randomColourStyleBuilder(type) {
style
}
}
-
-// source: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#ECMAScript_.28JavaScript.2FActionScript.2C_etc..29
-/*export function lon2tile(lon, zoom) {
- return (Math.floor((lon + 180) / 360 * Math.pow(2, zoom)));
-}
-
-export function lat2tile(lat, zoom) {
- return (Math.floor((1 - Math.log(Math.tan(lat * Math.PI / 180) + 1 / Math.cos(lat * Math.PI / 180)) / Math.PI) / 2 * Math.pow(2, zoom)));
-}*/