Hoppa till huvudinnehållet

set map extent

Kommentarer

12 kommentarer

  • Nico Burgerhart
    Is the Shape field published with the mapservice?
    0
  • Permanently deleted user

    Yes. And I actually think I figured out what is going on.

    The layer that was being referred to had multiple instances of that value so the zoom was going to the first instance, as it was told to. I changed the layer of reference to a layer that has only one instance of the boundary polygon and it seems to be working.

     

    Thanks for the quick reply though!

     

    Still working on refining this zoom level.

     

    Sometimes the polygon is fully encapsulated in the zoom extent, other times it chooses to zoom a little bit closer and therefore cuts off some of the outer edges of the polygon. Is this because the zoom feature is hard-wired to choose the closest zoom level extent? If so, is there a work around so that the entire polygon feature is displayed and not just the closest set default extent?

     

    TIA
    0
  • Permanently deleted user
    Additionally, the workflow that quit zooming altogether is still being investigated...the above "fix" refers to the workflow that was still zooming, just to the wrong extent.
    0
  • Permanently deleted user
    I tried to zoom to the polygon using SelectFeatures and then GetFeatureSetExtent and then SetMapExtent. Still not zooming to the extent of the selection... Exact same workflow works (partially, as described above) for another layer kept on same server with same shape and even the same field name...
    0
  • Permanently deleted user
    Hvae you tried putting an Alert activity in your workflow and display the value of the GetFeatureSetExtent activity to see if you're actually getting a valid extent object?
    0
  • Permanently deleted user
    Hi Peter, Yes, I can display the value of the resulting feature set, and it is correct (though I can't diplay the value of the resulting envelope created with the GetFGeatureSetExtent because it cannot be read as a string). Also, the SelectFeatures will select the correct feature and add it to a list on the webmap. When this list item is clicked manually, the webmap zooms into the proper extent. It just isn't doing it automatically like it should be...
    0
  • Permanently deleted user
    For the zoom issue, have you tried setting the Feature Zoom Factor or Feature Zoom Scale for the layer? This setting worked well for me in a similar situation.
    0
  • Permanently deleted user
    Hi Rebecca. No, I hadn't! However, I just now played around a little with the Zoom Factor and it didn't make a difference :-(  

     

    I can't really set the Zoom Scale as the scale will differ for each polygon's geometry (some are huge polygons and some are not)...

     

    I am new to this software so might be missing something very small...

     

    Anybody :-)

     

    Are there any examples of the correct argument format for the SetMapExtent activity in workflow? Is there possibly an argument I can add to "Extent"?

     

    My argument reads:  featureSet1.first().Geometry.Extent

     

    I am flying a little bit blind here, and the help documentation is not very helpful...

     

    Maybe there is a better way to pass the featureSet1 variable into the SetMapExtent handler? A middle step perhaps?

     

    TIA

     

     
    0
  • Permanently deleted user
    Okay. Here is a clunky fix... I created a buffer using BufferTask which outputs a graphic (enumerable) variable. Using this graphic variable, I was able to zoom to the chosen polygon... still having some issues with the zoom snapping to the nearest scale rather than ensuring the entire polygon is encapsulated in the view port BUT this is progress and so sharing as a "fix".

     

    Thank you all for your suggestions!

     

    Any ideas on fixing the zoom issue would be appreciated, also, any ideas as to WHY this zoom works now with a buffer graphic to zoom to??

     

    Cheers,

     

    Suzanne.
    0
  • Permanently deleted user
    The Feature Zoom Scale setting seems to work well for most of our parcels but I did notice that the zooming is affected by the scale levels in the tiled map service I'm using (ESRI World Topo). The map will snap to the closest scale from the tiled map service rather than honour the specified zoom factor setting. This is less than ideal behaviour (although unavoidable, I think) but in our case it's usually close enough because the World Topo service has several scale levels.   
    0
  • Permanently deleted user
    Suzanne,

     

    The result of the GetFeatureSetExtent activity is an Envelope object, so you should be able to view it in an Alert activity by putting ".ToString()" on the end of the Envelope variable name.  It should display a comma seperated list of coordinates for the new extent. So, in your alert activity's Title or Text box, you could just put "myEnvelopeName.toString()" where myEnvelopeName is the name of Envelope you used as the Result of the GetFeatureSetExtent Activity.

     

     
    0
  • Permanently deleted user
    Hi Peter, that is excellent to know! Thank you.
    0

Du måste logga in om du vill lämna en kommentar.