1.3.3 • Published 2 months ago

@mapgear/geoapps-ui-framework v1.3.3

Weekly downloads
-
License
-
Repository
-
Last release
2 months ago

GeoApps UI Framework

This package contains the GeoApps UI Framework. With this package you can design and build easily apps based on the GeoApps-platform.

More information?: www.geoapps.nl

What's new

  • Breaking: MapBlock is renamed to MapComponent
  • Breaking: The properties on GeoApps and MapComponent has been changed
  • The package now handles React correctly, and requires a minimum version of react and react-dom 16.14.0 in your own project. No additional config is required anymore
  • The components for the action bar, groups and buttons are added in this version

Getting started

This guide will help you set up a new React project with the GeoApps UI Framework.

Start a project

Start a new React project. Create-react-app is a useful tool to get going. For this getting started guide, we'll use TypeScript and NPM. Create-react-app also supports JavaScript, or Yarn of you prefer.

npx create-react-app my-geoapp --template typescript --use-npm
cd my-geoapp

Add GeoApps UI Framework

Adding the GeoApps UI Framework is as easy as running a NPM install command. This will automatically add the latest version of the UI framework:

npm install @mapgear/geoapps-ui-framework

Start development server

By now, you can start a development server. This server will serve the application on http://localhost:3000/ and will live update whenever you make changes. By default, a browser window will be opened every time you start the development server. If you don't want that to happen, create an .env file at the same level als your package.json file and node_modules directory. Enter this content:

BROWSER=none

Add components

Open the file src/App.tsx in your favorite IDE or (code) editor. Replace its content with:

import "./App.css";
import {
    GeoApps,
    SmartForm,
    TabbedContainer,
    MapBlock,
} from "@mapgear/geoapps-ui-framework";

function App() {
    return (
        <GeoApps>
            <div className="maincontainer">
                <TabbedContainer id="1" className="sidepanel sidepanel-left">
                    <Tab id="form">
                        <SmartForm formId={3} contentId={1} />
                    </Tab>
                </TabbedContainer>

                <div id="2" className="mainpanel">
                    <MapComponent
                        mapId="ENTER YOUR MAP ID HERE"
                        tenantUrl="ENTER YOUR TENANT URL HERE"
                    />
                </div>
            </div>
        </GeoApps>
    );
}

export default App;

Don't forget to change the mapId and tenantUrl property of the MapComponent component.

Add references to libraries

Add references to required libraries to your HTML's head node in public/index.html. Make sure you replace with the url of your tenant.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://<tenanturl>/scripts/geoapps/v1/geoapps.min.js"></script>

Styling

Optionally, replace your stylesheet in src/App.css with the following content:

body {
  padding: 0px;
}
html, body {
  height: 100%;
}
* {
  box-sizing: content-box;
}
.geoapps-map {
  width: 100%;
  height: 100vh;
}
.maincontainer {
  width: 100%;
  height: 100vh;
  display: flex;
  overflow: hidden;
}
.sidepanel {
  flex: 1;
  max-width: 300px;
  height: 100%;
  overflow: hidden;
}
.mainpanel {
  display: flex;
  flex: 1;
}
2.0.0-beta.27

2 months ago

2.0.0-beta.26

5 months ago

2.0.0-beta.22

10 months ago

2.0.0-beta.24

8 months ago

2.0.0-beta.23

8 months ago

1.3.3

10 months ago

2.0.0-beta.21

1 year ago

2.0.0-beta.20

1 year ago

2.0.0-beta.15

1 year ago

2.0.0-beta.19

1 year ago

2.0.0-beta.18

1 year ago

2.0.0-beta.17

1 year ago

2.0.0-beta.16

1 year ago

2.0.0-beta.14

1 year ago

2.0.0-beta.11

1 year ago

2.0.0-beta.12

1 year ago

2.0.0-beta.10

2 years ago

2.0.0-beta.9

2 years ago

2.0.0-beta.8

2 years ago

2.0.0-beta.7

2 years ago

2.0.0-beta.6

2 years ago

1.2.0

2 years ago

2.0.0-beta.5

2 years ago

2.0.0-beta.4

2 years ago

2.0.0-beta.3

2 years ago

1.0.0

2 years ago

0.2.120

2 years ago

2.0.0-beta.2

2 years ago

0.2.118

2 years ago

0.2.117

2 years ago

0.2.114

2 years ago

0.2.112

2 years ago

1.0.2-tags-1-0.1

2 years ago

0.3.0

2 years ago

0.3.2

2 years ago

0.4.0

2 years ago

0.2.83

2 years ago

0.2.102

2 years ago

0.2.111

2 years ago

0.2.98

2 years ago

0.2.109

2 years ago

0.2.63

3 years ago

0.2.64

3 years ago

0.2.30

3 years ago

0.2.38

3 years ago

0.2.34

3 years ago

0.2.39

3 years ago

0.2.27

3 years ago

0.2.21

3 years ago

0.2.17

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.4

3 years ago

0.2.0

3 years ago

0.1.16

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago