Work in Progress
Configuration Prerequisites
Creating the Map File
Getting a Google API Key
Configure Google API Key
Configure Map Types
Configure Centres and Zoom Levels
Configuration Prerequisites
- The individual performing this installation has some Linux experience.
- NMIS8 is installed on the same server where opMaps will be installed
- NMIS8 is installed in /usr/local/nmis8
- opMaps is installed into /usr/local/opmantek
- Root access is available (not always needed but much easier)
- Perl 5.10
- RRDtool 1.4.7
Creating the Map File
After installing opMaps, you will need to set up the GroupLocations.nmis so opMaps can display a geographic map of your NMIS status.
To do this you will need to :
- Change your current directory to /usr/local/opmantek/bin/
- Execute the Perl script configmaps.pl
This script creates the Map Files based on the NMIS Node files.
Usage: ./configmaps.pl <NODES> <GroupLocations>
cd /usr/local/opmantek/bin/ ./configmaps.pl /usr/local/nmis8/conf/Nodes.nmis /usr/local/opmantek/conf/GroupLocations.nmis
Getting a Google API Key
opMaps ships with a default Google API Key, It is recommended to use your own Google API Key.
If you don’t already have one, please follow these steps from Google to acquire one.
Configure Google API Key
To configure your own Google API key, open the Maps.nmis file in /usr/local/opmantek/conf/
Find the following line and replace the defaultAPI with your own Google API KEY
'googleApiKey' => 'defaultAPI',
Configure Map Types
To configure what map type to display, open the Maps.nmis file in /usr/local/opmantek/conf/
Find the following line under 'mapview' => and replace the mapType with the map type you want.
'mapTypeId' => 'mapType',
The Follow map types can be used
google.maps.MapTypeId.ROADMAP
displays the default road map viewgoogle.maps.MapTypeId.SATELLITE
displays Google Earth satellite imagesgoogle.maps.MapTypeId.HYBRID
displays a mixture of normal and satellite viewsgoogle.maps.MapTypeId.TERRAIN
displays a physical map based on terrain information.