C# SDK

◆ AddBitmapToMap()

static int AddBitmapToMap ( out SError  Error,
string  strBitmapPath,
int  lX,
int  lY,
out int  nBitmapID,
int  MaxTime 
)
inlinestatic

The function shows picture on BrowseMap.

Parameters
ErrorAdditional error information returned from Drive.
strBitmapPathFull path to desired picture.
lXX-coordinate of picture position on BrowseMap.
lYY-coordinate of picture position on BrowseMap.
nBitmapIDPicture ID that can be used later to manipulate with picture. Value is set by AddBitmapToMap function.
MaxTimeMaximum time (in milliseconds) function can take. If MaxTime=0 function execution is not time limited.
Returns
1 if successful, other value otherwise.

Picture must be of 32 bit bmp format.

X and Y coordinates represents geographical longitude and latitude taken in meters.

. BrowseMap is map shown on after clicking Browse Map menu button. BrowseMap allows browse the loaded maps and change zoom.

See Coordinates conversion section in TROUBLESHOOTING page.

Possible error codes returned from Drive are:

  • 0 - Function not succeeded.
  • 1 - Function succeeded.
  • 2 - Drive not succeeded.
  • 3 - Function reached timeout.



SError error;
string strBitmapPath = "\\Pictures\\MyPicture.bmp";
int lX, lY;
int nBitmapID;
string strAddress = "SVK,Bratislava,Einsteinova,1";
LONGPOSITION Position;
int MaxTime = 10000;
CApplicationAPI.LocationFromAddress(out error, out Position, strAddress, MaxTime);
lX = Position.lX;
lY = Position.lY;
CApplicationAPI.AddBitmapToMap(out error, strBitmapPath, lX, lY, out nBitmapID, MaxTime);

This code shows picture MyPicture.bmp on the map in Bratislava town, Einsteinova street.
Picture ID stores fuction to nBitmapID.

References SError.SizeOf().