Solving Georeferencing Problems on Connecting External Services

When connecting external map services one may come across the issue when borders of aligned maps mismatch. The difference in coordinates can be caused by the following:

  1. Incorrect value of the "proportionality" attribute - "0.67" that is located in the topobase header part.

  2. Topobase georeferencing is incorrect or missing:

<fs:Geo>
    <fs:GeoItem Latitude="83.608096" Longitude="-168.230659" X="0" Y="0"></fs:GeoItem>
    <fs:GeoItem Latitude="-56.586816" Longitude="-169.636909" X="1" Y="1"></fs:GeoItem>
</fs:Geo>

To set up georeferencing, follow the steps:

  1. Load the topobase contents to file:

  1. Open the loaded file using a text editor and change value of the "proportionality" attribute 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. Sometimes, it is enough to execute the Steps 1 and 2 to align topobase borders. Save the file with the topobase, proceed to the Step 9 and check how borders are displayed.

  1. Copy the file contents.

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

When hovering over the pasted text with the <svg> tag, the Google map or Yandex map will display the added map as a blue rectangle:

  1. Select the <svg> tag, go to the Styles section and set styles for the added map in the element.style section to make the map visible against the Google map or Yandex map:

element.style {
    position: absolute;
    border: 1px solid red;
    left: 300px;
    top: 170px;
    opacity: .4;
}
  1. Align borders of the territories of the pasted map and the Google map or Yandex map by manually dragging the Google map or Yandex map.

NOTE. Before executing these operations set the size of the Google map or Yandex map to minimum. Disable the Globus parameter in the Google map's menu.

  1. Set coordinates of the points to (0;0) and (1;1). To do this, click next to the upper top left and bottom right corners outside the pasted map. Coordinates of the points will be displayed on the Google map. To view coordinates on the Yandex map, click with the right mouse button and select the What's Here? context menu item. Write down the coordinates to paste them to the topobase.

  1. Write the obtained coordinates for the points (0;0) and (1;1) to the <fs:MetaInfo> section in the topobase file using a text editor, for example:

<fs:MetaInfo>
    <fs:Geo>
        <fs:GeoItem Latitude="81.509077" Longitude="17.877862" X="0" Y="0"></fs:GeoItem>
        <fs:GeoItem Latitude="40.265518" Longitude="-168.445904" X="1" Y="1"></fs:GeoItem>
    </fs:Geo>
    ...
</fs:MetaInfo>
  1. Load the updated topobase to replace its data. To do this, select the Load from File item in the topobase's context menu in the object navigator of the desktop application.

  2. Open the report with the map in the web application or in the designer of business applications and check if borders of the topobase and the Google map or Yandex map match.

See also:

Connecting External Map Services to Map