Algorithm/Javascript code for esri.geometry.toScreenGeometry()

662
2
03-14-2013 01:48 AM
NiranjanBorawake
New Contributor
Hi,

Can some one please share or point me to an algorithm and/or javascript code (actual implementation) of the ArcGIS' esri.geometry.toScreenGeometry(extent, width, height, screenGeometry) geometry service. Details at

geometry service details.

I have to get screen geometries for about 15,000-20,000 points. Calling above geometry service in loop takes substatial amount of time around 5 secs for 15,000 points.

I am looking for a javascript function which would take input as above service and return me screen geometyr object.

I have already got a javascript function for this esri.geometry.geographicToWebMercator(geometry) service.

Thanks,
Niranjan
0 Kudos
2 Replies
RahulMetangale1
Occasional Contributor II
Niranjan,

I do not think esri.geometry.toScreenGeometry calls geometry service. it will perform calculation on client side.

Rahul
0 Kudos
NiranjanBorawake
New Contributor
Hi Rahul,

Yes, you seem to be right, the calculation is performed at client side and no service is called.

But is there a chance where I can get the algorithm that does this.

My plan is to implement this algo in java code so that I reduce the work that is done on browser.

Thanks,

Niranjan
0 Kudos