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:

<fs:Geo>
    <fs:GeoItem Latitude="83.608096" Longitude="-168.230659" X="0" Y="0"></fs:GeoItem>
    <fs:GeoItem Longitude="-56.586816" Longitude="-169.636909" X="1" Y="1"></fs:GeoItem>
</fs: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:fs="http://www.fsight.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:

When the cursor is on the inserted text with the <svg> tag, the Google map displays the 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 in the background:

element.style {
    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:

<fs:MetaInfo>
    <fs:Geo>
        <fs:GeoItem Latitude="81.509077" Longitude="17.877862" X="0" Y="0"></fs:GeoItem>
        <fs:GeoItem Longitude="40.265518" Longitude="-168.445904" X="1" Y="1"></fs:GeoItem>
    </fs:Geo>
    ...
</fs:MetaInfo>
  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