none
South African coordinates [-33.884599, 18.627334] does not work RRS feed

  • Question

  • When I create a map control with the following coordinates [-33.884599, 18.627334], maps ends up at [0,0]

        const map = new atlas.Map("myMap", {
          center: [-33.884599, 18.627334],
          zoom: 4,
          language: "en-US",
          authOptions: {
            authType: "subscriptionKey",
            subscriptionKey: "--------------------------"
          }
        });


    Wednesday, January 8, 2020 8:34 AM

All replies

  • Looking into this, the map is rendering at;

    Longitude: -33.884599

    Latitude: 18.627334

    Which is in the ocean, likely why you thought [0,0].

    Note that Azure Maps aligns with the GIS industry standard of [longitude, latitude] (this is equivalent to [x,y]).

    Reversing your values for the coordinate generates the map of south Africa you are expecting:

       const map = new atlas.Map("myMap", {
          center: [18.627334, -33.884599],
          zoom: 4,
          language: "en-US",
          authOptions: {
            authType: "subscriptionKey",
            subscriptionKey: "--------------------------"
          }
        });

    Wednesday, January 8, 2020 5:25 PM
  • @DawidMostert

    Have you had a chance to the above suggestions? Do let us know if you need further help.

    If a post helps to resolve your issue, please click the "Mark as Answer" of that post and/or click Answered "Vote as helpful" button of that post. By marking a post as Answered and/or Helpful, you help others find the answer faster.

    Monday, January 13, 2020 4:48 AM
    Moderator