-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1630: optimized iframe embedded version
- Loading branch information
Showing
10 changed files
with
170 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<title>MapStore 2 HomePage</title> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway" type='text/css'> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css" /> | ||
<link rel="stylesheet" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/0.2.4/leaflet.draw.css" /> | ||
<link rel="stylesheet" href="dist/themes/default.css" id="theme_stylesheet"> | ||
<link rel="shortcut icon" type="image/png" href="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/favicon.ico" /> | ||
<script src="https://maps.google.com/maps/api/js?v=3"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.10/proj4.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js"></script> | ||
<script src="https://cdn.jslibs.mapstore2.geo-solutions.it/leaflet/0.2.4/leaflet.draw.js"></script> | ||
</head> | ||
<body> | ||
<div id="container"></div> | ||
<script src="dist/embedded.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* Copyright 2016, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
module.exports = { | ||
pages: [{ | ||
name: "mapviewer", | ||
path: "/:mapId", | ||
component: require('./pages/MapViewer') | ||
}], | ||
pluginsDef: require('./pluginsEmbedded.js'), | ||
initialState: { | ||
defaultState: { | ||
mode: "embedded", | ||
mousePosition: {enabled: false}, | ||
controls: { | ||
help: { | ||
enabled: false | ||
}, | ||
print: { | ||
enabled: false | ||
}, | ||
toolbar: { | ||
active: null, | ||
expanded: false | ||
}, | ||
drawer: { | ||
enabled: false, | ||
menu: "1" | ||
} | ||
}, | ||
mapInfo: {enabled: true, infoFormat: 'text/html' } | ||
}, | ||
mobile: { | ||
} | ||
}, | ||
storeOpts: { | ||
persist: { | ||
whitelist: ['security'] | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* Copyright 2017, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
const React = require('react'); | ||
const ReactDOM = require('react-dom'); | ||
const {connect} = require('react-redux'); | ||
const LocaleUtils = require('../utils/LocaleUtils'); | ||
|
||
const startApp = () => { | ||
const StandardApp = require('../components/app/StandardApp'); | ||
|
||
const {pages, pluginsDef, initialState, storeOpts} = require('./appConfigEmbedded'); | ||
|
||
const StandardRouter = connect((state) => ({ | ||
locale: state.locale || {}, | ||
pages | ||
}))(require('../components/app/StandardRouter')); | ||
|
||
const appStore = require('../stores/StandardStore').bind(null, initialState, { | ||
mode: (state = 'embedded') => state | ||
}, {}); | ||
|
||
const appConfig = { | ||
storeOpts, | ||
appStore, | ||
pluginsDef, | ||
initialActions: [], | ||
appComponent: StandardRouter, | ||
printingEnabled: true | ||
}; | ||
|
||
ReactDOM.render( | ||
<StandardApp {...appConfig} mode="embedded"/>, | ||
document.getElementById('container') | ||
); | ||
}; | ||
|
||
if (!global.Intl ) { | ||
// Ensure Intl is loaded, then call the given callback | ||
LocaleUtils.ensureIntl(startApp); | ||
}else { | ||
startApp(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Copyright 2016, GeoSolutions Sas. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
module.exports = { | ||
plugins: { | ||
IdentifyPlugin: require('../plugins/Identify'), | ||
TOCPlugin: require('../plugins/TOC'), | ||
BackgroundSwitcherPlugin: require('../plugins/BackgroundSwitcher'), | ||
MapPlugin: require('../plugins/Map'), | ||
ToolbarPlugin: require('../plugins/Toolbar'), | ||
DrawerMenuPlugin: require('../plugins/DrawerMenu'), | ||
SearchPlugin: require('../plugins/Search'), | ||
LocatePlugin: require('../plugins/Locate'), | ||
ZoomAllPlugin: require('../plugins/ZoomAll'), | ||
MapLoadingPlugin: require('../plugins/MapLoading'), | ||
OmniBarPlugin: require('../plugins/OmniBar') | ||
}, | ||
requires: { | ||
ReactSwipe: require('react-swipeable-views').default, | ||
SwipeHeader: require('../components/data/identify/SwipeHeader') | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters