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 :
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 |
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 entry.
'Customer' => or 'Business' => The name of the business/customer which is the name of the map.
'Location' => The location of each of the business/customer (Geodata).
'Group' => The NMIS group which relates to that business/customer.
By editing these you could change the groups that display on different maps.
Lets take an example, like a network with four groups, which represents a company with operations in Australia and the America's. The groups we have in NMIS are MexicoCity, NewYorkCity, Brisbane, GoldCoast. We want to end up with three maps, the "Default" map for all the locations and a regional map for each region.
%hash = ( 'Opmantek-Global1' => { 'Customer' => 'Opmantek-Global', 'Location' => 'Bundall, Queensland', 'Group' => 'GoldCoast' }, 'Opmantek-Global2' => { 'Customer' => 'Opmantek-Global', 'Location' => 'Brisbane, Queensland', 'Group' => 'Brisbane' }, 'Opmantek-Global3' => { 'Customer' => 'Opmantek-Global', 'Location' => 'Mexico City, Mexico', 'Group' => 'MexicoCity' }, 'Opmantek-Global4' => { 'Customer' => 'Opmantek-Global', 'Location' => 'New York City, New York', 'Group' => 'NewYorkCity' }, 'Opmantek-AU1' => { 'Customer' => 'Opmantek-AU', 'Location' => 'Bundall, Queensland', 'Group' => 'GoldCoast' }, 'Opmantek-AU2' => { 'Customer' => 'Opmantek-AU', 'Location' => 'Brisbane, Queensland', 'Group' => 'Brisbane' }, 'Opmantek-NA1' => { 'Customer' => 'Opmantek-NA', 'Location' => 'Mexico City, Mexico', 'Group' => 'MexicoCity' }, 'Opmantek-NA2' => { 'Customer' => 'Opmantek-NA', 'Location' => 'New York City, New York', 'Group' => 'NewYorkCity' }, ); |
Then you need to tell opMaps which map is the default map to load when it starts, by default the default map name is "Default", but you can change this by editing Maps.nmis
vi /usr/local/opmantek/conf/Maps.nmis |
Find the following line under 'mapview' =>
'defaultMap' => 'Default'
Replace the defaultMap with the map you want loaded, in our case "Opmantek-Global:.
eg: 'defaultMap' => 'Opmantek-Global'
By default opMaps will display a "TERRAIN" style map, to use an alternate map style, 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
ROADMAP
displays the default road map viewSATELLITE
displays Google Earth satellite imagesHYBRID
displays a mixture of normal and satellite viewsTERRAIN
displays a physical map based on terrain information.opMaps will automatically determine the correct map centre and zoom level for your maps, but sometimes, it will calculate the wrong centre for a human, to use an alternate map centre and zoom level you can follow the following instructions.
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',
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',