Hi everyone,
I'm working on an Angular app using ArcGIS JavaScript API v4.32, and I need help customizing the CoordinateConversion widget.
I want to achieve two things:
Keep only the "XY" format option (i.e., hide MGRS, UTM, etc.).
Display it in Lat, Lon order (Latitude first, then Longitude)
I’ve tried this:
 const latLonFormat = new CoordinateFormat({
      name: "Lat Lon",
      currentPattern: "YX",
      defaultPattern: "YX"
    });
 const coordinateConversion = new CoordinateConversion({
      view: this.view,
      formats: [latLonFormat], 
      multipleConversions: false,
      visibleElements: {
        settingsButton: false,
        editButton: false,
        expandButton: true,
        captureButton: true
      }
    });
But the widget still displays Longitude, Latitude (i.e., X, Y), regardless of what I set in currentPattern.
Solved! Go to Solution.
Hi @alabanu, thanks for posting your question here. You can do this, but you need to handle both the conversion and the reverse-conversion functions. Here is a sample app that you can follow:
https://codepen.io/noash/pen/EajrdrB?editors=1000
Hi @alabanu, thanks for posting your question here. You can do this, but you need to handle both the conversion and the reverse-conversion functions. Here is a sample app that you can follow:
https://codepen.io/noash/pen/EajrdrB?editors=1000