Rotation, scaling Polyline on esri map in javascript api

2866
5
Jump to solution
06-21-2016 10:16 AM
PavelVasilyev
New Contributor

Is it possible to rotate/scale/translate esri layer with polyline in javascript api 4.0 (or 3.16)?  I see they are just svg object but can't find appropriate api to do this.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Pavel,

  Sure If you feature is editable then you can just use the editor class to manipulate the geometry.

Editor | API Reference | ArcGIS API for JavaScript

View solution in original post

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Pavel,

  What do you mean by "with polyline"?

0 Kudos
PavelVasilyev
New Contributor

Sorry, for bad explanation.

Assume I have added a layer on map which contains polyline object using javascript api. I see in the page that this polyline is just a svg path object so it has transform attribute. I want to use this transform attribute to do rotation, scaling and translation of this svg object. So the question is does esri expose javascript api to do such manipulations on objects?

As a workaround I think I can try to get a svg object that corresponds to my layer using DOM api and change this attribute. But in this case I lost compatibility with other esri APIs such as Android API.

May be there is another way to do it?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Pavel,

  Sure If you feature is editable then you can just use the editor class to manipulate the geometry.

Editor | API Reference | ArcGIS API for JavaScript

PavelVasilyev
New Contributor

Robert,

Thank you! This part of API is it seems that I wanted.

Sorry for such questions, I've started looking at 4.0 API version, but 3.16 is more flexible.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Pavel,

Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.

0 Kudos