+ Reply to Thread
Results 1 to 3 of 3

Thread: X,Y coordinates to add a new point

  1. #1
    GIS.Nadir GIS.Elyass
    Join Date
    Dec 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default X,Y coordinates to add a new point

    Dears,
    How to add a functionality of adding a new point by providing input X,Y coordinates widget?

    I mean it is similar to locate by coordinate widget, where one fills the X,Y coordinates text boxes then press ADD button to update the SDE layer with a new point feature.

    Another challenge:
    What if the inserted coordinates are in a different projection than the the map spatial reference?

    Thanks

  2. #2
    Dasa Paddock

    Join Date
    Dec 2009
    Posts
    1,160
    Points
    386
    Answers Provided
    65


    1

    Default Re: X,Y coordinates to add a new point

    You can call applyEdits() on FeatureLayer or FeatureLayerTask.

    See:
    http://help.arcgis.com/en/webapi/fle...l#applyEdits()
    http://help.arcgis.com/en/webapi/fle...l#applyEdits()

    Code:
    var mapPoint:MapPoint = new MapPoint(x, y, new SpatialReference(123));
    var graphic:Graphic = new Graphic(mapPoint);
    featureLayer.applyEdits([graphic], null, null);
    The server will project the coordinates if necessary.
    Dasa Paddock
    Esri Flex and JavaScript Teams

  3. #3
    GIS.Nadir GIS.Elyass
    Join Date
    Dec 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: X,Y coordinates to add a new point

    Dear Paddok,
    Many thanks for your useful guidelines and help.
    I do appreciate it.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts