Solved! Go to Solution.
...for each polyline in my mapservice - i need x,y,z values. Can I do this?
I can't get geometry property from feature layer because it returns a String value
...since new MapPoint takes only x,y...
Assuming you are using version 3.0 or later. Yes I'm using 3.0 Flex Viewer(and ofc 3.0 API).
Yes, the map points of the arrays in the polylines should have a "z" property if your feature layer supports "z".Well I have my feature service with a layer, let's say named "road" - its a polyline layer that supports 'z' values(and 'm' but thats not the case right now).
Not sure how you are doing this, but you should be able to get the x/y/z from each feature in your feature layer.Ok so here is what i did:
<fx:Declarations> <esri:FeatureLayer id="road_layer" url="http://xxxxxxx/ArcGIS/rest/services/xxxxxxx/FeatureServer/0" returnZ="true"/> </fx:Declarations> //And now in Script tag I tried to read this layer details so: var layerDet:LayerDetails = road_layer.layerDetails;
This isn't true (if you are using the 3.0 API), see the http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/geometry/MapPoint.htmlOk you are right - i did read all the API reference for mappoint and polyline. The "new MapPoint()" takes 3 parameters - x,y and spatial reference(as it's written in API reference) so what I have to do is write something like this:
var mPoint:MapPoint = new MapPoint( 100, 100, new SpatialReference(102100)); mPoint.z = {some_value}; mPoint.m = {some_value};