Solving Problems with Georeferencing on Connecting External Services

In web application on connecting external map services borders of overlapping maps can be not matched. The cause why coordinates do not match:

  1. The incorrect value of the proportionality="0.67" attribute that is in the topobase header part.

  2. There is topobase georeferencing or setting is incorrect:

<p5:Geo>

<p5:GeoItem Latitude="83.608096" Longitude="-168.230659" X="0" Y="0"></p5:GeoItem>

<p5:GeoItem Longitude="-56.586816" Longitude="-169.636909" X="1" Y="1"></p5:GeoItem>

</p5:Geo>

To set up georeferencing, follow the steps:

  1. Download the contents of the topobase in use to the file:

  1. Open downloaded file with a text editor and change the proportionality attribute value to 0.6, for example:

<svg version="1.1" xmlns:p5="http://www.prognoz.ru" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"

width="988.52px" height="593.97px" proportionality="0.6" xml:space="preserve">

NOTE. In some cases, to overlap borders, it is required to execute only two first steps. Save file with topobase, go to the step 9 and check how borders are displayed.

  1. Copy file contents.

  1. Open the https://www.google.com/maps service:

On hovering the cursor over the pasted text containing the <svg> tag, Google map will display added map as a blue rectangle.

  1. Select the <svg> tag, go to the Styles section and set styles of added map in the element.style section to display it with Google map at the background:

position: absolute;

border: 1px solid red;

left: 300px;

top: 170px;

opacity: .4;

  1. Match territories of pasted map and Google map, manually moving Google map.

NOTE. Preliminary reduce the Google map to the minimum size and deselect the Globus menu item.

  1. After matching borders, click next to the top left and bottom right corner of the pasted map, the coordinates of the (0;0) and (1;1) points on Google map. Record them to further insert them to topobase.

  1. Insert obtained coordinates for the (0;0) and (1;1) points to the topobase file in the <p5:MetaInfo> section, for example:

<p5:MetaInfo>

<p5:Geo>

<p5:GeoItem Latitude="81.509077" Longitude="17.877862" X="0" Y="0"></p5:GeoItem>

<p5:GeoItem Latitude="40.265518" Longitude="-168.445904" X="1" Y="1"></p5:GeoItem>

</p5:Geo>

  1. To replace topobase data, select the Load from File topobase context menu item in the object navigator of desktop application.

  2. Open web application and check the topobase and Google map borders match.

See also:

Map Advanced Features