Gis View - Setting a custom default location to be displayed in the map
search cancel

Gis View - Setting a custom default location to be displayed in the map

book

Article ID: 135003

calendar_today

Updated On:

Products

CA eHealth CA Spectrum

Issue/Introduction

This article explains how to set a custom default location to be displayed in the Gis View map (a city, for example). Out of the box, Spectrum only accepts North America, South America, Europe, Africa, Asia, Antarctica, Arctic and Australia.

Environment

Release : 10.x

Component : Spectrum Core / SpectroSERVER

Resolution

For this procedure, we will use the city of Sao Paulo, Brazil as an example.


1- Using google maps, locate the city. Then, collapse the side panel, drag the city map to left/right/up/down as you wish, in order to make it centralized in the screen. 


After finishing the adjustments, take note of the latitude, longitude and zoom values displayed in the address bar (in this case, "-23.657634", "-46.540406" and "10"):




2- In Oneclick server, take a backup of the $SPECROOT\tomcat\webapps\spectrum\console\gis-view.jsp file, then edit it as below:


- Locate the following lines:


default:

     latlng = new google.maps.LatLng(37.09024, -95.712891);


- Right after that, insert the following lines, containing latitude and longitude values mentioned in step 1:


case 'sao paulo':

     latlng = new google.maps.LatLng(-23.657634,-46.5404068);

     break;


- Few lines below, change the zoom level from 5, to the value mentioned in the step 1 (in this case, “10”):


gblLatLng=new Array();

var mapOptions = {

       zoom: 10,

       center: latlng


- After saving changes, the file must be similar to this:



3- In Oneclick server, take a backup of the $SPECROOT\tomcat\webapps\spectrum\console\gisGC.config file, then insert the following line:

Location=sao paulo


- After saving the changes, the file must be similar to this:



4-  Open/refresh the Gis View map page. You should see Sao Paulo city being displayed by default:


Attachments