Map Center Point Calculation Rule

  • Last update:  2021-03-15
  • I. Description

    When writing the map JSON, some customers may not understand the calculation logic of the map center point clearly, so that the area clicked during drilling cannot be located to the map center. After clicking some areas, the area is not displayed in the center of the map. The normal logic display should Is the following effect:

    1.gif

    II. Introduction to Map Center Point Calculation Rules

    Take the maximum and minimum values of latitude and longitude, and take the average to get the center.

    The north latitude is greater than 0; the south latitude is less than 0;

    East longitude is greater than 0; West longitude is less than 0;

    But longitude, if the area crosses the east-west longitude, the center point of this calculation may not be needed, and the longitude needs to be processed into the same symbol.

    E.g:

    Aleutian Islands to Greenland Island, the longitude is about 170 to -20, (170-20) / 2 = 75

    In this way, it is not the desired result that the center of the Americas is in Eurasia.

    So record the longitude of the Aleutian Islands as 170-360 = -190, (-190-20) / 2 = -105

    This -105 degrees is in the American continent.

    Note: If you use our map editor to edit, the editing result has been processed.

    In addition: Because the Americas region is relatively large, when the zoom level corresponding to the drill level is set to automatic, the entire region is displayed by default, and the map will not automatically drill to the center point of the Americas. It is more appropriate to set it to 2 here.


    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy