Select to view content in your preferred language

get coordinates of polyline

1493
6
Jump to solution
07-24-2018 06:30 AM
MRReddy
Regular Contributor

In a map, i have several color polylines(indicating different status)

i know to write a condition to get all polylines values on map, but suppose if i want only blue color line polyline geometry,(how to write a condition to filter only blue polyline geometry), I tried several ways and got stuck here.

Any help appreciated

Thank you

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Malla,

   So you have to use GeometryService to project the Location_CenterPoint to web mercator if you are going to create a geodesic circle.

https://developers.arcgis.com/javascript/3/jsapi/geometryservice-amd.html#project 

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

Malla,

   You have some attribute condition statement that makes the line either red or blue so you have to query the layer using that same attribute condition. to get just one color of lines.

MRReddy
Regular Contributor

Hi robert #robert scheitlin

i did union of those polylines and extent and getcenter

now in getcenter()-> X and Y both values are positive. I believe x should be negative and when i load with both positive coordinates, nothing happening

But if i change spatial reference

i got below error

 "Creating a geodesic circle requires the center to be specified in web mercator or geographic coordinate system"

any suggestions

Thank you

0 Kudos
MRReddy
Regular Contributor

getting circle here, but i verified point in google maps, (value is correct), but it loading somewhere

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Malla,

  These questions seem to have little to do with your original question... So which question do you want answered and what does you code look like?

0 Kudos
MRReddy
Regular Contributor

below is my code

 var returngeometries_Site = geometryEngine.union(Site_CenterPoint);    //wkid 2881 latest wkid 2881
var extent = returngeometries_Site.getExtent();
var cmnpoint = extent.getCenter();
var Location_CenterPoint = new Point(cmnpoint .x, cmnpoint .y);

sending Location_CenterPoint  in to circle

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Malla,

   So you have to use GeometryService to project the Location_CenterPoint to web mercator if you are going to create a geodesic circle.

https://developers.arcgis.com/javascript/3/jsapi/geometryservice-amd.html#project 

0 Kudos