Zum Hauptinhalt gehen

Setting map extent from a point FeatureSet

Kommentare

5 Kommentare

  • Nico Burgerhart

    Use the Get Feature Set Extent tool to get the Feature Set envelope.

    If your Feature Set contains one point, you should create an extent envelope (a single point has no extent).

     

     

    0
  • Permanently deleted user

    Perfect - thanks Nico.  The tool was sitting there the whole time while I was trying to re-invent the wheel - much appreciated!

    0
  • Permanently deleted user
    I know this is an old post but can anyone elaborate more on the steps to creating a zoomable extent from a Feature Set consisting of  only one point? I'm not quite sure how to develop the extent envelope and set its X and Y values. Wouldn't it be easier to somehow buffer the point in the Feature Set instead? Any help would be appreciated.
    0
  • Permanently deleted user

    Erick,

     

    I can't remember where I got this, I am sure it was from the code gallery as I was looking through some example workflows.  But basically you check to see if the the featureset contains more than 1 element.  If it doesn't, then you'll add or subtract a specified offset distance from the x and y value to create a box around the single point.

     

    Here is a screen shot, I'll be more than happy to post my code if you need more assistance: 

    _img_ alt="User-added image" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=90760000000XbJR&feoid=Body&refid=0EM60000000XtWI" _/_img_

     

    resultEnvelope is of type Geometry.Envelope

     

    Then just use the 'set map extent' workflow activity to resultEnvelope.Extent
    0
  • Permanently deleted user
    You could always buffer a point and set your extent to the buffer.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.