View Full Version : pPlot.getLongitude()?


Jeckel
Sep 24, 2006, 08:00 PM
K, well I found pPlot.getLatitude(), but there doesn't seem to be a pPlot.getLongitude() method. Is there a special way to get this besides just grabing it from the CyPlot object or can you not get that value?

PeteT
Sep 25, 2006, 12:06 AM
It only works after you've built the Royal Observatory at Greenwich.

But, more seriously, it's just not defined.

Lord Olleus
Sep 26, 2006, 12:12 PM
How pPlot.getX() and pPlot.getY()?

Jeckel
Sep 26, 2006, 08:14 PM
Could someone post up the SDK code for the CyPlot.getLatitude() method?

MatzeHH
Sep 26, 2006, 11:09 PM
int CyPlot::getLatitude()
{
return m_pPlot ? m_pPlot->getLatitude() : -1;
}


int CvPlot::getLatitude() const
{
int iLatitude;

if (GC.getMapINLINE().isWrapXINLINE() || !(GC.getMapINLINE().isWrapYINLINE()))
{
iLatitude = ((getY_INLINE() * 100) / GC.getMapINLINE().getGridHeightINLINE());
}
else
{
iLatitude = ((getX_INLINE() * 100) / GC.getMapINLINE().getGridWidthINLINE());
}

iLatitude = ((iLatitude * (GC.getMapINLINE().getTopLatitude() - GC.getMapINLINE().getBottomLatitude())) / 100);

return abs(iLatitude + GC.getMapINLINE().getBottomLatitude());
}


Matze

Jeckel
Sep 27, 2006, 03:40 AM
Thanx man, that is just what I needed. :)