AfriGIS Map SDK (BB10)  v 1.0.0
Provides easy integration of AfriGIS Maps into BB10 platform.
Public Types | Public Slots | Signals | Public Member Functions | List of all members
AfrigisMapSDK Class Reference

An AfrigisMapSDK object provides an embeddable map interface. You use this class as-is to display map information and to manipulate the map contents from your application. You can centre the map on a given coordinate, specify the size of the area you want to display, and annotate the map with custom information. More...

#include <AfrigisMapSDK.hpp>

Inheritance diagram for AfrigisMapSDK:

Public Types

enum  ViewType { SatelliteView, MapView }
 

Public Slots

void clearMap ()
 clears the map. Removes all pins, annotations, routes and traffic layers. More...
 
void removeLocateMe ()
 remove locate-me. More...
 
void trackMe (AGTrackMeType type)
 Starts track-me. More...
 
void enableLocatingUserInCenter (bool enable)
 enable or disable re-centre map in user's current location. More...
 
void stopTracking ()
 stop tracking but show the last tracking position. More...
 
void stopAndRemoveTracking ()
 stop tracking and remove the indicator. More...
 
void addTrafficLayer ()
 show traffic layer on map. More...
 
void removeTrafficLayer ()
 remove traffic layer. More...
 
QObject * addRouteView (QList< QPair< float, float > > *routeGeoLocationCoordinates, bool startMarkerOn, bool endMarkerOn)
 show route on map. More...
 
void removeRouteView (QObject *routeView)
 remove route view. More...
 
void zoomToExtend (QList< AGLocationCoordinate2D > *listOfPoints)
 zoom to extend to show the given list of points fully on map. More...
 
void addPinView (AGGeoInformation *geoInfo, QByteArray *imageData, bool callOutBubbleEnabled, bool contextMenuEnabled)
 add pin view to show pin in certain location. More...
 
void removePinView ()
 remove pin view. More...
 
AnnotationViewaddAnnotationView (QList< Item * > *itemList=NULL)
 add annotation view. More...
 
void removeAnnotationView (AnnotationView *annotationView)
 remove annotation view. More...
 
PolylineItemcreatePolylineItem (QList< AGLocationCoordinate2D > *geoLocationCoordinates, bool enableZoomToExtend, AGOffsetInPixel offset=AGOffsetInPixel())
 add poly-line item. More...
 
CircleItemcreateCircleItem (QList< AGLocationCoordinate2D > *circleCenter, float circleRadius, QColor *circleColor, AGOffsetInPixel offset=AGOffsetInPixel())
 add circle item. More...
 
ImageItemcreateImageItem (QList< AGLocationCoordinate2D > *imageCenter, QByteArray *image, int imageWidth, int imageHeight, AGOffsetInPixel offset=AGOffsetInPixel())
 add Image item. More...
 
void updateLocation (AGLocationCoordinate2D *updatedLocationCoordinate=NULL, int zoomLevel=0)
 update centre location of map. More...
 
void pauseRender ()
 private. More...
 
void resumeRender ()
 private. More...
 
void enableZoomInOutButton (bool zoomInOutButtonEnabled)
 enable disable zoom in out button. More...
 
bool isBubbleTouched (double localX, double localY)
 private. More...
 
void setBubbleEnabled (bool bubbleStatus)
 enable disable bubble to show. More...
 
bool isBubbleEnabled ()
 get bubble enable status. More...
 

Signals

void signalTrackingStarted ()
 signal emits when tracking started. More...
 
void signalTrackingStopped ()
 signal emits when tracking stopped. More...
 
void signalUserLocatedWithAccuracy (int)
 signal emits when user located after tracking start. More...
 
void signalUserLocatingFailed ()
 signal emits when located user failed. More...
 
void signalMapViewTouchedDown (AGGeoInformation *)
 signal emits when touch down event occurs on map. More...
 

Public Member Functions

 AfrigisMapSDK (bb::cascades::Page *mapPage, double lat, double lon, int zoom, QString serviceName, QString serviceKey, AGMapViewDelegate *mapViewDelegate, ViewType viewType, int x, int y, int width, int height)
 Constructor to create map. More...
 
 AfrigisMapSDK (bb::cascades::Container *mapContainer, double lat, double lon, int zoom, QString serviceName, QString serviceKey, AGMapViewDelegate *mapViewDelegate, ViewType viewType, int x, int y, int width, int height, double scaleX=1.0, double scaleY=1.0)
 Constructor to create map. More...
 
void setViewType (ViewType viewType)
 set different view type of map: SatelliteView, MapView. More...
 
AGLocalPixelCoordinate2DgetLocalPixelFromLatLon (AGLocationCoordinate2D *geoCoordinate)
 get device's local pixel coordinate of a latitude-longitude pair. More...
 
AGLocationCoordinate2DgetLatLonFromLocalPixel (AGLocalPixelCoordinate2D *pixelCoordinate)
 get latitude-longitude pair of a device's local pixel coordinate. More...
 
AGGeoInformationgetCurrentBoundingBox ()
 get current bounding box informaion. More...
 

Detailed Description

An AfrigisMapSDK object provides an embeddable map interface. You use this class as-is to display map information and to manipulate the map contents from your application. You can centre the map on a given coordinate, specify the size of the area you want to display, and annotate the map with custom information.

Since
v0.6.0

Constructor & Destructor Documentation

AfrigisMapSDK::AfrigisMapSDK ( bb::cascades::Page *  mapPage,
double  lat,
double  lon,
int  zoom,
QString  serviceName,
QString  serviceKey,
AGMapViewDelegate mapViewDelegate,
ViewType  viewType,
int  x,
int  y,
int  width,
int  height 
)

Constructor to create map.

Parameters
PageContainer page where map will be displayed.
latlatitude of centre location.
lonlongitude of centre location.
zoomzoom level of map.
serviceNamevalid service name.
serviceKeyvalid service key.
AGMapViewDelegatedefines a set of optional methods that you can use to receive map related update messages.
ViewTypeof map: SatelliteView, MapView.
xcoordinate of map window.
ycoordinate of map window.
widthof the map window.
heightof the map window.
Since
v0.6.0
AfrigisMapSDK::AfrigisMapSDK ( bb::cascades::Container *  mapContainer,
double  lat,
double  lon,
int  zoom,
QString  serviceName,
QString  serviceKey,
AGMapViewDelegate mapViewDelegate,
ViewType  viewType,
int  x,
int  y,
int  width,
int  height,
double  scaleX = 1.0,
double  scaleY = 1.0 
)

Constructor to create map.

Parameters
Containerwhere map will be displayed.
latlatitude of centre location.
lonlongitude of centre location.
zoomlevel of map.
serviceNamevalid service name.
serviceKeyvalid service key.
AGMapViewDelegatedefines a set of optional methods that you can use to receive map related update messages.
ViewTypeof map: SatelliteView, MapView.
xcoordinate of map window.
ycoordinate of map window.
widthof the map window.
scaleXx-coordinate scale factor.
scaleYy-coordinate scale factor.
Since
v0.6.0

Member Function Documentation

AnnotationView * AfrigisMapSDK::addAnnotationView ( QList< Item * > *  itemList = NULL)
slot

add annotation view.

Parameters
itemListitems to be shown on this annotation view.
Returns
AnnotationView reference
Since
v0.6.0
void AfrigisMapSDK::addPinView ( AGGeoInformation geoInfo,
QByteArray *  imageData,
bool  callOutBubbleEnabled,
bool  contextMenuEnabled 
)
slot

add pin view to show pin in certain location.

Parameters
AGGeoInformationlatitude and longitude of the location.
imageDatato show as pin on map.
callOutBubbleEnabledenable call-out bubble.
contextMenuEnabledenable showing context menu.
Since
v0.6.0
QObject * AfrigisMapSDK::addRouteView ( QList< QPair< float, float > > *  routeGeoLocationCoordinates,
bool  startMarkerOn,
bool  endMarkerOn 
)
slot

show route on map.

Parameters
routeGeoLocationCoordinatesfor start point and end point.
startMarkerOnenable the start marker.
endMarkerOnenable the end marker.
Returns
created route view as QObject reference
Since
v0.6.0
void AfrigisMapSDK::addTrafficLayer ( )
slot

show traffic layer on map.

Since
v0.6.0
void AfrigisMapSDK::clearMap ( )
slot

clears the map. Removes all pins, annotations, routes and traffic layers.

Since
v0.6.0
CircleItem * AfrigisMapSDK::createCircleItem ( QList< AGLocationCoordinate2D > *  circleCenter,
float  circleRadius,
QColor *  circleColor,
AGOffsetInPixel  offset = AGOffsetInPixel() 
)
slot

add circle item.

Parameters
circleCenterlat lon for the circle.
circleRadiusin pixel.
circleColorto fill the circle.
AGOffsetInPixelMove offset pixel to draw circle.
Returns
CircleItem reference
Since
v0.6.0
ImageItem * AfrigisMapSDK::createImageItem ( QList< AGLocationCoordinate2D > *  imageCenter,
QByteArray *  image,
int  imageWidth,
int  imageHeight,
AGOffsetInPixel  offset = AGOffsetInPixel() 
)
slot

add Image item.

Parameters
imageCenterlat lon for the image to draw.
imagedata to draw.
imageWidthdata to draw.
imageHeightdata to draw.
AGOffsetInPixelMove offset pixel to draw image.
Returns
ImageItem reference
Since
v0.6.0
PolylineItem * AfrigisMapSDK::createPolylineItem ( QList< AGLocationCoordinate2D > *  geoLocationCoordinates,
bool  enableZoomToExtend,
AGOffsetInPixel  offset = AGOffsetInPixel() 
)
slot

add poly-line item.

Parameters
geoLocationCoordinatesfor the poly-line.
enableZoomToExtendfor the poly-line.
AGOffsetInPixelMove offset pixel to draw poly-line.
Returns
PolylineItem reference
Since
v0.6.0
void AfrigisMapSDK::enableLocatingUserInCenter ( bool  enable)
slot

enable or disable re-centre map in user's current location.

Parameters
enablevalue
Since
v0.6.0
void AfrigisMapSDK::enableZoomInOutButton ( bool  zoomInOutButtonEnabled)
slot

enable disable zoom in out button.

Parameters
zoomInOutButtonEnabledto set.
Since
v0.6.0
AGGeoInformation * AfrigisMapSDK::getCurrentBoundingBox ( )

get current bounding box informaion.

Returns
AGGeoInformation struct for current bounding box information.
Since
v0.6.0
AGLocationCoordinate2D * AfrigisMapSDK::getLatLonFromLocalPixel ( AGLocalPixelCoordinate2D pixelCoordinate)

get latitude-longitude pair of a device's local pixel coordinate.

Parameters
AGLocationCoordinate2Dstruct for latitude and longitude.
Returns
AGLocalPixelCoordinate2D struct for local pixel coordinate.
Since
v0.6.0
AGLocalPixelCoordinate2D * AfrigisMapSDK::getLocalPixelFromLatLon ( AGLocationCoordinate2D geoCoordinate)

get device's local pixel coordinate of a latitude-longitude pair.

Parameters
AGLocationCoordinate2Dstruct for latitude and longitude.
Returns
AGLocalPixelCoordinate2D struct for local pixel coordinate.
Since
v0.6.0
bool AfrigisMapSDK::isBubbleEnabled ( )
slot

get bubble enable status.

Since
v0.6.0
bool AfrigisMapSDK::isBubbleTouched ( double  localX,
double  localY 
)
slot

private.

Since
v0.6.0
void AfrigisMapSDK::pauseRender ( )
slot

private.

Since
v0.6.0
void AfrigisMapSDK::removeAnnotationView ( AnnotationView annotationView)
slot

remove annotation view.

Parameters
annotationViewto be removed.
Since
v0.6.0
void AfrigisMapSDK::removeLocateMe ( )
slot

remove locate-me.

Since
v0.6.0
void AfrigisMapSDK::removePinView ( )
slot

remove pin view.

Since
v0.6.0
void AfrigisMapSDK::removeRouteView ( QObject *  routeView)
slot

remove route view.

Parameters
routeViewreference of route view to be removed.
Since
v0.6.0
void AfrigisMapSDK::removeTrafficLayer ( )
slot

remove traffic layer.

Since
v0.6.0
void AfrigisMapSDK::resumeRender ( )
slot

private.

Since
v0.6.0
void AfrigisMapSDK::setBubbleEnabled ( bool  bubbleStatus)
slot

enable disable bubble to show.

Parameters
bubbleStatusto set
Since
v0.6.0
void AfrigisMapSDK::setViewType ( ViewType  viewType)

set different view type of map: SatelliteView, MapView.

Parameters
ViewTypeof map: SatelliteView, MapView.
Since
v0.6.0
void AfrigisMapSDK::signalMapViewTouchedDown ( AGGeoInformation )
signal

signal emits when touch down event occurs on map.

Parameters
AGGeoInformationbounding box information.
Since
v0.6.0
void AfrigisMapSDK::signalTrackingStarted ( )
signal

signal emits when tracking started.

Since
v0.6.0
void AfrigisMapSDK::signalTrackingStopped ( )
signal

signal emits when tracking stopped.

Since
v0.6.0
void AfrigisMapSDK::signalUserLocatedWithAccuracy ( int  )
signal

signal emits when user located after tracking start.

Parameters
accuracyof location information.
Since
v0.6.0
void AfrigisMapSDK::signalUserLocatingFailed ( )
signal

signal emits when located user failed.

Since
v0.6.0
void AfrigisMapSDK::stopAndRemoveTracking ( )
slot

stop tracking and remove the indicator.

Since
v0.6.0
void AfrigisMapSDK::stopTracking ( )
slot

stop tracking but show the last tracking position.

Since
v0.6.0
void AfrigisMapSDK::trackMe ( AGTrackMeType  type)
slot

Starts track-me.

Parameters
AGTrackMeTypeType of track-me: AGTrackMeTypeAccuracy, AGTrackMeTypeDirection, AGTrackMeTypeBoth AGTrackMeTypeAccuracy : It will show a circle to represent accuracy AGTrackMeTypeDirection : It will show an arrow to represent direction AGTrackMeTypeBoth : It will show both circle and arrow.
Since
v0.6.0
void AfrigisMapSDK::updateLocation ( AGLocationCoordinate2D updatedLocationCoordinate = NULL,
int  zoomLevel = 0 
)
slot

update centre location of map.

Parameters
AGLocationCoordinate2Dlat lon of centre.
zoomLevelto set.
Since
v0.6.0
void AfrigisMapSDK::zoomToExtend ( QList< AGLocationCoordinate2D > *  listOfPoints)
slot

zoom to extend to show the given list of points fully on map.

Parameters
listOfPointsgiven to show on map.
Since
v0.6.0

The documentation for this class was generated from the following files: