GPS display and text tracking

Source: Internet
Author: User

/GPS display
Bool supermapgisctrl: showgps (double longtitudex, double latitudey, cstring gpsid, long iconnum, cstring Introduction)
{
 
Csogeopoint objgeopoint;
Csostyle objsty;
 

Objsty. createdispatch (L "Supermap. sostyle ");
Objsty. setsymbolstyle (m_bufferparam.gpsicon );
Objsty. setsymbolsize (50 );
Objgeopoint. createdispatch (L "Supermap. sogeopoint ");
Objgeopoint. setx (longtitudex );
Objgeopoint. sety (latitudey );

// Car text
Csotextpart objtextpart;
Csogeotext objtext;
Objtextpart. createdispatch (L "Supermap. sotextpart ");
Objtext. createdispatch (L "Supermap. sogeotext ");
 
Objtextpart. setx (m_mapctrl-> pixeltomapx (m_mapctrl-> maptopixelx (longtitudex) + 10 ));
Objtextpart. sety (m_mapctrl-> pixeltomapy (m_mapctrl-> maptopixely (latitudey) + 10 ));
 

Objtextpart. settext (gpsid );
Objtext. addpart (objtextpart );
Csotextstyle objtextstyle;
Objtextstyle. createdispatch (L "Supermap. sotextstyle ");
Objtextstyle. setcolor (RGB (4,44, 250 ));
 
Objtextstyle. setfixedtextsize (35 );
 
Objtextstyle. setfontheight (50.00 );
Objtextstyle. setfixedsize (true );
Objtextstyle. setbold (true );
Objtext. settextstyle (isotextstyle *) objtextstyle. m_lpdispatch );

M_trackinglayer.removeevent (colevariant (gpsid + L "GPS "));
M_trackinglayer.removeevent (colevariant (gpsid ));
If (m_trackinglayer.addevent (objgeopoint, objsty, gpsid + L "GPS ")
& M_trackinglayer.addevent (objtext, objsty, gpsid ))
{
M_trackinglayer.refreshex ();
}
 
Objsty. releasedispatch ();
Objgeopoint. releasedispatch ();
Return true;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.