Skip to end of banner
Go to start of banner

opMaps Configuration Guide

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »


 

Configuration Prerequisites

  • The individual performing this configuration has some Linux experience
  • NMIS8 is installed in /usr/local/nmis8
  • opMaps is installed into /usr/local/opmantek according to the installation guide
  • Root access is available (not always needed but much easier)
  • Perl 5.10 
  • RRDtool 1.4.7

Create 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

Configure Map File

After creating GroupLocations.nmis, you may edit the file in the directory /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/GroupLocations.nmis

The following text is an example of what a GroupLocations.nmis file might look like

%hash = (
 'NMIS8' => {
 'Customer' => 'Opmantek',
 'Location' => 'Bundall, Queensland',
 'Group' => 'NMIS8'
 }
);

In this example  'NMIS8' represents a map.

'Customer' => or 'Business' => The name of the business/customer.

'Location' => The location of each of the business/customer (Geodata).

'Group' => The group that business/customer belongs to.

By editing these you could change the groups that display on different maps.

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/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following line under 'mapview' =>

'googleApiKey' => 'defaultAPI'

Replace the defaultAPI with your own Google API KEY

eg: 'googleApiKey' => 'AIzaSyBfa5791NQUs3N7x--ueD3DwQPmscElk-8'

Configure Map Types

To configure what map type to display, open the Maps.nmis file in /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following line under 'mapview' => 

'mapTypeId' => 'mapType'

Replace the mapType with the map type you want.

eg: 'mapTypeId' => 'google.maps.MapTypeId.TERRAIN'

The Follow map types can be used

  • google.maps.MapTypeId.ROADMAP displays the default road map view
  • google.maps.MapTypeId.SATELLITE displays Google Earth satellite images
  • google.maps.MapTypeId.HYBRID displays a mixture of normal and satellite views
  • google.maps.MapTypeId.TERRAIN displays a physical map based on terrain information.

Configure Default Centres and Zoom Levels

To configure the default centres and  zoom levels, open the Maps.nmis file in /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following lines under 'mapview' =>

'mapCentre' => 'X, Y',
'mapZoom' => 'zoomLevel'    

Replace the X,Y and zoomLevel with the value you want.

eg :

'mapCentre' => '10, -180',
'mapZoom' => '3',

Configure Centres and Zoom Levels for Different Maps

To configure the default centres and  zoom levels, open the Maps.nmis file in /usr/local/opmantek/conf/

vi /usr/local/opmantek/conf/Maps.nmis

Find the following lines under 'group' =>,

'mapCentre-groupName' => 'X, Y',
'mapZoom-groupName' => 'zoomLevel',

Replace the groupName with a group name replace the X,Y and zoomLevel with the value you want.

eg:
'mapZoom-Opmantek-US' => '5',
'mapCentre-Opmantek-EU' => '50, 20',
  • No labels