ISMapView Class Reference

Inherits from CCGLView
Declared in ISMapView.h

Overview

Class used to represent the ISMapView (EAGLView).

Other Methods

  renderMode

Rendering mode (2D or 3D)

@property (nonatomic, readonly) ISERenderMode renderMode

Declared In

ISMapView.h

  currentRatio

Last computed ratio.

@property (nonatomic, readonly) double currentRatio

Declared In

ISMapView.h

  currentOffset

Last computed offset.

@property (nonatomic, readonly) CGPoint currentOffset

Declared In

ISMapView.h

  mapDelegate

Map view events delegate.

@property (weak) id<ISMapViewDelegate> mapDelegate

Declared In

ISMapView.h

  currentMapId

Current displayed map identifier.

@property (nonatomic, readonly) int currentMapId

Declared In

ISMapView.h

  currentAzimuth

Current displayed map azimuth.

@property (nonatomic, readonly) float currentAzimuth

Declared In

ISMapView.h

  currentZoomLevel

Current zoom level.

@property (nonatomic, readonly) float currentZoomLevel

Declared In

ISMapView.h

  currentScreenCenter

Current screen center (in meters).

@property (nonatomic, readonly) CGPoint currentScreenCenter

Declared In

ISMapView.h

  rotationAngle

Current rotation angle (in degrees).

@property (nonatomic, readonly) float rotationAngle

Declared In

ISMapView.h

+ isCocos2dInitialized

Static method used to konw if the Cocos2d engine is initialized.

+ (Boolean)isCocos2dInitialized

Return Value

YES if it’s initialized, otherwise NO.

Declared In

ISMapView.h

+ generateCocos2dUniqueId

Static method used to get a unique render identifier for ISRTO.

+ (int)generateCocos2dUniqueId

Return Value

InitProvider unique instance.

Declared In

ISMapView.h

Navigation

– resetMap

Method used to reset the current map view with its root map (default zoom level and start center).

- (void)resetMap

Declared In

ISMapView.h

– resetMapWithStartMapId:

Method used to reset the current map with a specific map (default zoom level and start center).

- (void)resetMapWithStartMapId:(NSNumber *)startMapId

Parameters

startMapId

Map identifier you want to display.

Declared In

ISMapView.h

  scrollEnabled

This property controls only user interactions with the map. If you set the value of this property to NO, you may still change the map location programmatically. The default value of this property is YES.

@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled

Declared In

ISMapView.h

– centerMapWithZone:andAnimated:

Method used to center the map on a specific zone.

- (void)centerMapWithZone:(int)zoneId andAnimated:(Boolean)animated

Parameters

zoneId

Related zone identifer.

animated

Boolean used to know if an animation needs to be performed.

Declared In

ISMapView.h

– centerMapWithZone:andAnimated:andDuration:

Method used to center the map on a specific zone.

- (void)centerMapWithZone:(int)zoneId andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

zoneId

Related zone identifer.

animated

Boolean used to know if an animation needs to be performed.

duration

Wanted animation duration.

Declared In

ISMapView.h

– centerMapWithZone:andZoomLevel:andAnimated:andDuration:

Method used to center the map on a specific zone.

- (void)centerMapWithZone:(int)zoneId andZoomLevel:(float)zoomLevel andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

zoneId

Related zone identifer.

zoomLevel

Wanted zoom level.

animated

Boolean used to know if an animation needs to be performed.

duration

Wanted animation duration.

Declared In

ISMapView.h

– centerMapWithPosition:andAnimated:

Method used to center the map on a specific position (in meters).

- (void)centerMapWithPosition:(ISPosition *)position andAnimated:(Boolean)animated

Parameters

position

The position (in meters) to center on (x, y, mapId).

animated

Boolean used to know if an animation needs to be performed.

Declared In

ISMapView.h

– centerMapWithPosition:andAnimated:andDuration:

Method used to center the map on a specific position (in meters).

- (void)centerMapWithPosition:(ISPosition *)position andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

position

The position (in meters) to center on (x, y, mapId).

animated

Boolean used to know if an animation needs to be performed.

duration

Wanted animation duration.

Declared In

ISMapView.h

– centerMapWithPosition:andZoomLevel:andAnimated:

Method used to center the map on a specific position (in meters).

- (void)centerMapWithPosition:(ISPosition *)position andZoomLevel:(float)zoomLevel andAnimated:(Boolean)animated

Parameters

position

The position (in meters) to center on (x, y, mapId).

zoomLevel

Wanted zoom level.

animated

Boolean used to know if an animation needs to be performed.

Declared In

ISMapView.h

– centerMapWithPosition:andRotationAngle:andAnimated:

Method used to center the map on a specific position (in meters).

- (void)centerMapWithPosition:(ISPosition *)position andRotationAngle:(float)rotationAngle andAnimated:(Boolean)animated

Parameters

position

The position (in meters) to center on (x, y, mapId).

rotationAngle

Wanted rotation angle.

animated

Boolean used to know if an animation needs to be performed.

Declared In

ISMapView.h

– centerMapWithPosition:andRotationAngle:andAnimated:andDuration:

Method used to center the map on a specific position (in meters).

- (void)centerMapWithPosition:(ISPosition *)position andRotationAngle:(float)rotationAngle andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

position

The position (in meters) to center on (x, y, mapId).

rotationAngle

Wanted rotation angle.

animated

Boolean used to know if an animation needs to be performed.

duration

Wanted animation duration.

Declared In

ISMapView.h

– centerMapWithPosition:andZoomLevel:andRotationAngle:andAnimated:andDuration:

Method used to center the map on a specific position (in meters).

- (void)centerMapWithPosition:(ISPosition *)position andZoomLevel:(float)zoomLevel andRotationAngle:(float)rotationAngle andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

position

The position (in meters) to center on (x, y, mapId).

zoomLevel

Wanted zoom level.

rotationAngle

Wanted rotation angle.

animated

Boolean used to know if an animation needs to be performed.

duration

Wanted animation duration.

Declared In

ISMapView.h

  zoomEnabled

This property controls only user interactions with the map. If you set the value of this property to NO, you may still change the zoom level programmatically. The default value of this property is YES.

@property (nonatomic, assign, getter=isZoomEnabled) BOOL zoomEnabled

Declared In

ISMapView.h

– zoomIn:

Method called to zoom in (zoom level++).

- (void)zoomIn:(Boolean)animated

Parameters

animated

Boolean used to know if an animation needs to be performed.

Declared In

ISMapView.h

– zoomOut:

Method called to zoom out (zoom level–).

- (void)zoomOut:(Boolean)animated

Parameters

animated

Boolean used to know if an animation needs to be performed.

Declared In

ISMapView.h

– zoomWithZoomLevel:andAnimated:

Method called to zoom to a zoom level for a specific map. We keep the current center position.

- (void)zoomWithZoomLevel:(float)zoomLevel andAnimated:(Boolean)animated

Parameters

zoomLevel

Wanted zoom level.

animated

A Boolean used to know if we zoom with animation.

Declared In

ISMapView.h

– zoomWithZoomLevel:andAnimated:andDuration:

Method called to zoom to a zoom level for a specific map. We keep the current center position.

- (void)zoomWithZoomLevel:(float)zoomLevel andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

zoomLevel

Wanted zoom level.

animated

A Boolean used to know if we zoom with animation.

duration

Wanted animation duration.

Declared In

ISMapView.h

– zoomToSpan:andAnimated:

Method called to zoom to a span rect (in meters).

- (void)zoomToSpan:(ISRectF *)span andAnimated:(Boolean)animated

Parameters

span

A rectangle defining the viewport to match.

animated

A Boolean used to know if we zoom with animation.

Declared In

ISMapView.h

– zoomToSpan:andAnimated:andDuration:

Method called to zoom to a span rect (in meters).

- (void)zoomToSpan:(ISRectF *)span andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

span

A rectangle defining the viewport to match.

animated

A Boolean used to know if we zoom with animation.

duration

Wanted animation duration.

Declared In

ISMapView.h

  rotationEnabled

This property controls only user interactions with the map. If you set the value of this property to NO, you may still change the rotation angle programmatically. The default value of this property is YES.

@property (nonatomic, assign, getter=isRotationEnabled) BOOL rotationEnabled

Declared In

ISMapView.h

– rotateWithAngle:andAnimated:

Method called to rotate the map according a specific angle.

- (void)rotateWithAngle:(float)angle andAnimated:(Boolean)animated

Parameters

angle

The angle to rotate.

animated

A Boolean used to know if we rotate with animation.

Declared In

ISMapView.h

– rotateWithAngle:andAnimated:andDuration:

Method called to rotate the map according a specific angle.

- (void)rotateWithAngle:(float)angle andAnimated:(Boolean)animated andDuration:(float)duration

Parameters

angle

The angle to rotate.

animated

A Boolean used to know if we rotate with animation.

duration

Wanted animation duration.

Declared In

ISMapView.h

– changeMapWithMapId:andKeepPosition:andKeepZoomLevel:andKeepRotationAngle:andCompletionHandler:

Method used to show a Map with its id.

- (void)changeMapWithMapId:(int)mapId andKeepPosition:(Boolean)keepPosition andKeepZoomLevel:(Boolean)keepZoomLevel andKeepRotationAngle:(Boolean)keepRotationAngle andCompletionHandler:(ISMapViewChangeMapHandler)completionHandler

Parameters

mapId

The Map id to show.

keepPosition

Boolean used to know if we keep the current position when changing map.

keepZoomLevel

Boolean used to know if we keep the current zoom level when changing map.

keepRotationAngle

Boolean used to know if we keep the current rotation angle when changing map.

completionHandler

The API initialization handler to call. - mapChanged YES if the map effectively changed, otherwise NO.

Declared In

ISMapView.h

– startRendering

Method used to start map rendering.

- (void)startRendering

Declared In

ISMapView.h

– stopRendering

Method used to stop map rendering.

- (void)stopRendering

Declared In

ISMapView.h

– isRendering

Method used to know if the map is currently rendering.

- (Boolean)isRendering

Return Value

YES if the map is currently rendering, otherwise NO.

Declared In

ISMapView.h

– disableBackground

Method used to hide the background color (transparent behaviour).

- (void)disableBackground

Declared In

ISMapView.h

– getRendererWithRTOClass:

Method used to get a specific map Renderer.

- (id<ISRenderer>)getRendererWithRTOClass:(Class)rtoClass

Parameters

rtoClass

The Renderer corresponding class.

Return Value

The corresponding Renderer, nil if not exists.

Declared In

ISMapView.h

– hasRenderer:

Method used to know if the map view has a specific renderer.

- (Boolean)hasRenderer:(Class)rtoClass

Parameters

rtoClass

The Renderer corresponding class.

Return Value

YES if the map has the specified renderer, otherwise NO.

Declared In

ISMapView.h

– addRenderer:

Method used to add a specific Renderer (layer).

- (Boolean)addRenderer:(id<ISRenderer>)renderer

Parameters

renderer

The Renderer to add.

Return Value

Boolean used to know if the Renderer has been successfully added.

Declared In

ISMapView.h

– removeRendererWithRtoClass:

Method used to remove a specific Renderer (layer) according to its related RTO class.

- (void)removeRendererWithRtoClass:(Class)rtoClass

Parameters

rtoClass

The related RTO class.

Declared In

ISMapView.h

– removeRenderer:

Method used to remove a specific Renderer.

- (void)removeRenderer:(id<ISRenderer>)renderer

Parameters

renderer

The renderer to remove.

Declared In

ISMapView.h

– clearRendererWithRTOClass:

Method used to clear a specific Renderer.

- (void)clearRendererWithRTOClass:(Class)rtoClass

Parameters

rtoClass

The related RTO class.

Declared In

ISMapView.h

– setRendererPriorityWithRTOClass:andPriority:

Method called to set a priority to a specific Renderer.

- (void)setRendererPriorityWithRTOClass:(Class)rtoClass andPriority:(int)priority

Parameters

rtoClass

The related RTO class.

priority

The priority to update.

Declared In

ISMapView.h

– setRendererDisplayWithRTOClass:andDisplay:

Method called to specify if a Renderer need to be displayed.

- (void)setRendererDisplayWithRTOClass:(Class)rtoClass andDisplay:(Boolean)display

Parameters

rtoClass

The related RTO class.

display

Boolean used to set if the Renderer will be displayed.

Declared In

ISMapView.h

– setRendererTouchWithRTOClass:andTouch:

Method called to specify if a Renderer need to answer on a touch event.

- (void)setRendererTouchWithRTOClass:(Class)rtoClass andTouch:(Boolean)touch

Parameters

rtoClass

The related RTO class.

touch

Boolean used to set if the Renderer will handle touch events.

Declared In

ISMapView.h

– addRTO:

Method used to add a simple RenderingTouchObject.

- (Boolean)addRTO:(id<ISRTO>)rto

Parameters

rto

The RTO to add.

Return Value

Boolean used to know if a new ISGenericRenderer was created.

Declared In

ISMapView.h

– addRTO:inZone:

Method used to add a RTO on a specific Zone.

- (Boolean)addRTO:(id<ISRTO>)rto inZone:(int)zoneId

Parameters

rto

The RTO to add.

zoneId

The Zone id in which add the RTO.

Return Value

Boolean used to know if a new ISGenericRenderer was created.

Declared In

ISMapView.h

– addRTO:inZone:withOffset:

Method used to add a RTO on a specific Zone with a specific offset.

- (Boolean)addRTO:(id<ISRTO>)rto inZone:(int)zoneId withOffset:(CC3Vector)offset

Parameters

rto

The RTO to add.

zoneId

The Zone id in which add the RTO.

offset

Zone offset to consider.

Return Value

Boolean used to know if a new ISGenericRenderer was created.

Declared In

ISMapView.h

– addRTO:inZonePoi:

Method used to add a RTO with a specific Zone/Poi association.

- (Boolean)addRTO:(id<ISRTO>)rto inZonePoi:(ISZonePoi *)zonePoi

Parameters

rto

The RTO to add.

zonePoi

The Zone/Poi association to add from.

Return Value

Boolean used to know if a new ISGenericRenderer was created.

Declared In

ISMapView.h

– removeRTO:

Method called to remove an RTO from all zones where it’s located.

- (void)removeRTO:(id<ISRTO>)rto

Parameters

rto

The RTO to remove.

Declared In

ISMapView.h

– removeRTO:fromZone:

Method called to remove an RTO from a specific Zone.

- (void)removeRTO:(id<ISRTO>)rto fromZone:(int)zoneId

Parameters

rto

The RTO to remove.

zoneId

The Zone id from which remove the RTO.

Declared In

ISMapView.h

– clearZone:

Method called to remove all the RTO present in the Zone.

- (void)clearZone:(int)zoneId

Parameters

zoneId

id The concerned Zone.

Declared In

ISMapView.h

– clear

Method called to remove all the RTO.

- (void)clear

Declared In

ISMapView.h

– getRTOsWithZoneId:

Method used to get all RTO from a given zone identifier.

- (NSArray *)getRTOsWithZoneId:(int)zoneId

Parameters

zoneId

Corresponding zone identifier.

Return Value

An array of all linked RTO (could be nil).

Declared In

ISMapView.h

Touch

– setRTODelegate:withRTOClass:

Method called to set a delegate to a specific renderer.

- (void)setRTODelegate:(id<ISRTODelegate>)rtoDelegate withRTOClass:(Class)rtoClass

Parameters

rtoDelegate

The delegate to set.

rtoClass

The related RTO class.

Declared In

ISMapView.h