Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dev branch from Release candidate 1.1 #125

Merged
merged 18 commits into from
Jul 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7392d9f
Merge pull request #113 from county-of-simcoe-gis/hotfix-sidebar-cras…
reed-tom Jun 22, 2021
02f8e7b
Merge pull request #119 from county-of-simcoe-gis/dev
reed-tom Jul 8, 2021
79f41c8
applied code formatting changes
reed-tom Jul 8, 2021
977af15
- added ability to show coordinates for MyMaps items
reed-tom Jul 9, 2021
7c7d114
Merge pull request #120 from county-of-simcoe-gis/feature-hide-search…
reed-tom Jul 9, 2021
8417a26
switched getDefaultGroup to compare with group label rather than value
reed-tom Jul 9, 2021
cf583f3
Merge pull request #121 from county-of-simcoe-gis/bugfix-group-url-pa…
reed-tom Jul 9, 2021
f661b60
switched feature zoom on search to variable based on the size of the …
reed-tom Jul 9, 2021
b54175a
added ability to export drawing to multiple formats
reed-tom Jul 9, 2021
08bdd4b
Merge pull request #122 from county-of-simcoe-gis/feature-search-zoom…
reed-tom Jul 9, 2021
cac4ee9
removed "Cancel" from drawType lookup
reed-tom Jul 19, 2021
fe9041d
changed SR compare to uppercase
reed-tom Jul 19, 2021
ea341fb
added check for items prior to saving MyMaps
reed-tom Jul 19, 2021
2eafc80
added warning message option for layers and re-enabled disclaimer mes…
reed-tom Jul 20, 2021
ed820ad
Merge pull request #123 from county-of-simcoe-gis/rc-bug-fixes
reed-tom Jul 20, 2021
77c3d92
hide export option in my map for items that are not open data
reed-tom Jul 20, 2021
62d7856
updated community services theme logo
reed-tom Jul 22, 2021
ceb230e
Merge pull request #124 from county-of-simcoe-gis/211-enhancements-rc
reed-tom Jul 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39,574 changes: 19,787 additions & 19,787 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opengis",
"homepage": "https://opengis.simcoe.ca/public/",
"version": "1.0.11",
"version": "1.1.0",
"private": true,
"dependencies": {
"array-move": "^2.2.2",
Expand Down
26 changes: 13 additions & 13 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"short_name": "County of Simcoe GIS - Interactive Map",
"name": "County of Simcoe GIS - Interactive Map",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
"short_name": "County of Simcoe GIS - Interactive Map",
"name": "County of Simcoe GIS - Interactive Map",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
29 changes: 5 additions & 24 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,14 @@ import ReactGA from "react-ga";
import packageJson from "../package.json";

const enableAnalytics = helpers.getURLParameter("ANALYTICS") !== "off";
if (
mainConfig.googleAnalyticsID !== undefined &&
mainConfig.googleAnalyticsID !== "" &&
enableAnalytics
) {
if (mainConfig.googleAnalyticsID !== undefined && mainConfig.googleAnalyticsID !== "" && enableAnalytics) {
ReactGA.initialize(mainConfig.googleAnalyticsID);
ReactGA.pageview(window.location.pathname + window.location.search);
}

class App extends Component {
setControlPreferences() {
const localMapControls = helpers.getItemsFromStorage(
"Map Control Settings"
);
const localMapControls = helpers.getItemsFromStorage("Map Control Settings");

if (localMapControls !== undefined) window.mapControls = localMapControls;
else window.mapControls = mainConfig.controls;
Expand Down Expand Up @@ -76,28 +70,15 @@ function MapApp() {
helpers.loadConfig(() => {
document.title = window.config.title;
helpers.addIsLoaded("settings");
if (window.config.default_theme !== undefined)
window.emitter.emit(
"activateSidebarItem",
window.config.default_theme,
"themes"
);
if (window.config.default_tool !== undefined)
window.emitter.emit(
"activateSidebarItem",
window.config.default_tool,
"tools"
);
if (window.config.default_theme !== undefined) window.emitter.emit("activateSidebarItem", window.config.default_theme, "themes");
if (window.config.default_tool !== undefined) window.emitter.emit("activateSidebarItem", window.config.default_tool, "tools");
});
}, []);

return (
<div>
<div id="portal-root" />
<LoadingScreen
visible={mapLoading || sidebarLoading || headerLoading}
backgroundColor={"#3498db"}
/>
<LoadingScreen visible={mapLoading || sidebarLoading || headerLoading} backgroundColor={"#3498db"} />
<Header mapLoading={mapLoading} sidebarLoading={sidebarLoading} />
<Sidebar mapLoading={mapLoading} headerLoading={headerLoading} />
<SCMap sidebarLoading={sidebarLoading} headerLoading={headerLoading} />
Expand Down
7 changes: 1 addition & 6 deletions src/componentTemplate/ThemeComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ class ThemeComponent extends Component {

render() {
return (
<PanelComponent
onClose={this.onClose}
name={this.props.name}
helpLink={this.props.helpLink}
type="themes"
>
<PanelComponent onClose={this.onClose} name={this.props.name} helpLink={this.props.helpLink} type="themes">
<div>Put your components in here.</div>
</PanelComponent>
);
Expand Down
7 changes: 1 addition & 6 deletions src/componentTemplate/ToolComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ class ToolComponent extends Component {

render() {
return (
<PanelComponent
onClose={this.onClose}
name={this.props.name}
helpLink={this.props.helpLink}
type="tools"
>
<PanelComponent onClose={this.onClose} name={this.props.name} helpLink={this.props.helpLink} type="tools">
<div>Put your components in here.</div>
</PanelComponent>
);
Expand Down
2 changes: 1 addition & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
"name": "211 Community Services",
"componentName": "TwoOneOne",
"description": "Explore 211 Community Services across the County of Simcoe.",
"imageName": "communityServices.png"
"imageName": "211communityServices.png"
}
],
"sidebarShortcutParams": [
Expand Down
6 changes: 1 addition & 5 deletions src/header/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
padding: 0px;
z-index: auto;
position: absolute;
background: linear-gradient(
to bottom,
rgba(255, 255, 255, 1) 0%,
rgba(229, 229, 229, 1) 100%
);
background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(229, 229, 229, 1) 100%);
display: table;
}

Expand Down
66 changes: 9 additions & 57 deletions src/header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ import FloatingMenu, { FloatingMenuItem } from "../helpers/FloatingMenu.jsx";
import { Item as MenuItem } from "rc-menu";
import Portal from "../helpers/Portal.jsx";

const feedbackTemplate = (
url,
xmin,
xmax,
ymin,
ymax,
centerx,
centery,
scale
) =>
`${url}/?xmin=${xmin}&xmax=${xmax}&ymin=${ymin}&ymax=${ymax}&centerx=${centerx}&centery=${centery}&scale=${scale}`;
const feedbackTemplate = (url, xmin, xmax, ymin, ymax, centerx, centery, scale) => `${url}/?xmin=${xmin}&xmax=${xmax}&ymin=${ymin}&ymax=${ymax}&centerx=${centerx}&centery=${centery}&scale=${scale}`;
class Header extends Component {
constructor(props) {
super(props);
Expand All @@ -39,8 +29,7 @@ class Header extends Component {
burgerButtonHandler() {
helpers.waitForLoad("map", Date.now(), 30, () => {
// EMIT A CHANGE IN THE SIDEBAR (IN OR OUT)
if (window.sidebarOpen)
window.emitter.emit("setSidebarVisiblity", "CLOSE");
if (window.sidebarOpen) window.emitter.emit("setSidebarVisiblity", "CLOSE");
else window.emitter.emit("setSidebarVisiblity", "OPEN");

helpers.addAppStat("Burger Button", "Click");
Expand All @@ -51,17 +40,8 @@ class Header extends Component {
var evtClone = Object.assign({}, evt);
const menu = (
<Portal>
<FloatingMenu
key={helpers.getUID()}
buttonEvent={evtClone}
item={this.props.info}
onMenuItemClick={this.onMenuItemClick}
styleMode="left"
>
<MenuItem
className="sc-floating-menu-toolbox-menu-item"
key="sc-floating-menu-login"
>
<FloatingMenu key={helpers.getUID()} buttonEvent={evtClone} item={this.props.info} onMenuItemClick={this.onMenuItemClick} styleMode="left">
<MenuItem className="sc-floating-menu-toolbox-menu-item" key="sc-floating-menu-login">
<FloatingMenuItem imageName={"lock.png"} label="Login (Sample)" />
</MenuItem>
</FloatingMenu>
Expand Down Expand Up @@ -90,22 +70,8 @@ class Header extends Component {
const ymax = extent[3];
const center = window.map.getView().getCenter();

let feedbackUrl = feedbackTemplate(
window.config.feedbackUrl,
xmin,
xmax,
ymin,
ymax,
center[0],
center[1],
scale
);
if (
window.config.mapId !== null &&
window.config.mapId !== undefined &&
window.config.mapId.trim() !== ""
)
feedbackUrl += "&MAP_ID=" + window.config.mapId;
let feedbackUrl = feedbackTemplate(window.config.feedbackUrl, xmin, xmax, ymin, ymax, center[0], center[1], scale);
if (window.config.mapId !== null && window.config.mapId !== undefined && window.config.mapId.trim() !== "") feedbackUrl += "&MAP_ID=" + window.config.mapId;
helpers.showURLWindow(feedbackUrl, false, "full");
});
};
Expand All @@ -131,29 +97,15 @@ class Header extends Component {
</div>
<div id="sc-header-bar-logo">
<img
src={
this.state.logoImage === "" ||
this.state.logoImage.toString().substring(0, 4).toUpperCase() ===
"HTTP"
? this.state.logoImage
: require("./images/" + this.state.logoImage)
}
src={this.state.logoImage === "" || this.state.logoImage.toString().substring(0, 4).toUpperCase() === "HTTP" ? this.state.logoImage : require("./images/" + this.state.logoImage)}
alt="Header Logo"
/>
</div>
<div id="sc-header-search-container">
<Search options={this.props.options} />
</div>
<div
className="sc-header-feedback-container"
title="Feedback"
onClick={this.onFeedbackClick}
>
<img
style={{ marginTop: "5px" }}
src={require("./images/feedback.png")}
alt="feedback"
/>
<div className="sc-header-feedback-container" title="Feedback" onClick={this.onFeedbackClick}>
<img style={{ marginTop: "5px" }} src={require("./images/feedback.png")} alt="feedback" />
Feedback
</div>
{/* <div className="sc-header-dot-menu-container" onClick={this.onDotMenuClick}><img className="sc-header-dot-menu-img" src={images['vertical-dot-menu.png']} alt="dots"></img></div> */}
Expand Down
3 changes: 1 addition & 2 deletions src/header/Search.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@
width: 100%;
padding-left: 7px;
box-shadow: none;
background: url(./images/magnify.png) 100% 50% / auto no-repeat scroll
padding-box border-box rgb(255, 255, 255);
background: url(./images/magnify.png) 100% 50% / auto no-repeat scroll padding-box border-box rgb(255, 255, 255);
}

.sc-search-icon-initial {
Expand Down
Loading