This component allows you to display the areas of a region of the world and the mouse coordinates relating to a pointed area. It is added to mapguide-react-layout-example using the mapguide-react-layout viewer module.
- The zone data comes from the site https://epsg.org/
- The data necessary to define the projections comes from the site https://epsg.io/
This repo contains an example of a customized mapguide-react-layout viewer bundle.
This custom viewer bundle uses the mapguide-react-layout npm module
- MapGuide Open Source 3.0 or higher (or equivalent version of Autodesk Infrastructure Map Server) with the default Sheboygan sample data set loaded.
- node.js 6.x or newer
- Optional: Yarn package manager
- Clone this repository. For ease of getting started, clone this repo into MapGuide's
www
directory with the clone directory namedsample
:C:\Program Files\OSGeo\MapGuide\Web\www\sample
on Windows/usr/local/mapguideopensource-x.y.z/webserverextensions/www/sample
on Linux
- Install the required packages:
yarn install
ornpm install
- Choose one of the following:
- Build the viewer in development mode:
yarn run build:dev
npm run build:dev
- Build the viewer in development mode and have webpack continually watch the source files:
yarn run watch:dev
npm run watch:dev
- Build the viewer in production mode:
yarn run build
npm run build
- Build the viewer in development mode:
- Load the example Application Definition
resources/React.xml
into your site repository. If you have MapGuide Maestro, you can just drag and drop this file into the Site Explorer. For this example, make sure the Application Definition document is inSamples/Sheboygan/FlexibleLayouts
- Launch the custom viewer bundle using the sample template:
http://servername/mapguide/sample/sample_template.html?resource=Library://Samples/Sheboygan/FlexibleLayouts/React.ApplicationDefinition