Optimization of sketchviewmodel reshape tool with more then thousand vertices

385
2
Jump to solution
06-04-2020 03:56 AM
rsharma
Occasional Contributor III

Hi ,

I am having a difficult time with reshape tool, when i have very large boundary on mountains then  this line automatically plot the vertices, but it takes so much time, that my browser wants to kill itself.

sketchViewModel.update([newDevelopmentGraphic], {tool: "reshape"});

Is their anyway i can optimize my code because without reshape tool my graphics added instantly. i have checked server side, waiting time marely is 3 ms but while making it editable automatically, it kill my page for very very large boundaries.

For small boundaries .it works fine. the boundary i am using is of 2300 hectares almost.

//*** Get dynamic lat long on click and get linz db to show linz polygons***//
window.showCoordinates=function(pt){
var currentdate = new Date();
var coords = "Lat/Lon " + pt.latitude + " " + pt.longitude;
if(coords != '') {
jQuery.ajax({
type : "POST",
dataType : "JSON",
url :url,
data : {action:'get_property_polygon',ring_coordinate_x:pt.longitude,ring_coordinate_y:pt.latitude},
success: function(response) {
if(response.status=='success'){
console.log("LIne No:553 "+currentdate.getSeconds());
addGraphics(response.ring);
console.log("LIne No:555 "+currentdate.getSeconds());

sketchViewModel.update([newDevelopmentGraphic], {tool: "reshape"});
}
///Remove linz title class from main div
}
});//End Ajax
}//ENd if
};//End ShowCoordinates

0 Kudos
1 Solution

Accepted Solutions
rsharma
Occasional Contributor III

Hi i have resolved this problem, i just upgraded from version 4.13 to 4.16, they have some upgradation in reshape tool i think. my vertices were around 4000, they all plot instantly

But still when i try to reshape it by dragging them, they still consume time for this much big boundaries

View solution in original post

0 Kudos
2 Replies
rsharma
Occasional Contributor III

Hi, any help or suggestions from the community are very helpful, but please do help in this task, as my web app wll always work with large boundaries.... and this will kill my browser for reshaping.

any IDEA to break down large boundaries for reshaping. .. please suggest

0 Kudos
rsharma
Occasional Contributor III

Hi i have resolved this problem, i just upgraded from version 4.13 to 4.16, they have some upgradation in reshape tool i think. my vertices were around 4000, they all plot instantly

But still when i try to reshape it by dragging them, they still consume time for this much big boundaries

0 Kudos