### Start Playback
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMTracksPlayer.html
Starts the track playback from the beginning.
```APIDOC
## start()
### Description
Starts the track playback from the beginning.
```
--------------------------------
### FMActualNavigation.start
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Starts the navigation.
```APIDOC
## start()
### Description
Starts the navigation.
### Method
Method
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```
--------------------------------
### Starting Simulate Navigation
Source: https://developer.fengmap.com/docs/ios/v2.5.20/Classes/FMKVoiceNavigationManager.html
Starts simulated navigation. When simulated navigation is enabled, an internal timer is activated to simulate movement along the path and play voice prompts.
```APIDOC
## startSimulateNavigation
### Description
Starts simulated navigation. When simulated navigation is enabled, an internal timer is activated to simulate movement along the path and play voice prompts.
### Method
- (BOOL)startSimulateNavigation
### Declared In
FMKVoiceNavigationManager.h
```
--------------------------------
### Building Loaded Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'buildingLoaded' event, indicating that a building's data has finished loading.
```javascript
{
type:"buildingLoaded", // 事件类型
buildingID:"xxxxxxx",//子建筑ID
}
```
--------------------------------
### FMSimulateNavigation.simulate
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Starts the simulation of navigation.
```APIDOC
## simulate(float)
### Description
Starts the simulation of navigation.
### Method
Method
### Parameters
#### Path Parameters
- **float** (float) - Description
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```
--------------------------------
### setStartOption
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Sets the starting point style for navigation.
```APIDOC
## setStartOption(FMPointOption)
### Description
Sets the starting point style.
### Class
com.fengmap.android.analysis.navi.FMNavigation
```
--------------------------------
### Add Start and End Points for Navigation
Source: https://developer.fengmap.com/develop-android-guide-routenavi.html
Before starting navigation, set the start and end points. Each point requires coordinate information (FMGeoCoord) and marker information (FMPointOption). Configure marker properties like image, size, and height.
```Java
/** 设置起点*/
// 设置坐标信息
mNavigation.setStartPoint(startPt);
// 配置标注物属性对象
Bitmap startBmp = BitmapFactory.decodeResource(getResources(), R.drawable.start);
mStartOption.setBitmap(startBmp);
// 设置标注物属性对象
mNavigation.setStartOption(mStartOption);
/** 设置终点*/
mNavigation.setEndPoint(endPt);
Bitmap endBmp = BitmapFactory.decodeResource(getResources(), R.drawable.end);
mEndOption.setBitmap(endBmp);
mNavigation.setEndOption(mEndOption);
```
--------------------------------
### simulate
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMNavigationDrive.html
Starts simulated navigation with specified options.
```APIDOC
## simulate(options)
### Description
Starts simulated navigation with specified parameters.
### Parameters
#### Path Parameters
- **options** (Object) - Required - Simulation navigation parameters.
- **speed** (number) - Optional - The speed at which the simulated navigation icon moves, in m/s. Defaults to 7 m/s.
- **followPosition** (boolean) - Optional - Whether the map should center on the position when it changes during simulated navigation. Defaults to `true`.
- **followAngle** (boolean) - Optional - Whether the map should follow the direction changes to keep the route facing upwards on the screen during simulated navigation. Defaults to `false`.
- **changeTiltAngle** (boolean) - Optional - Whether to change the map's tilt angle and perform an animation when the floor changes during simulated navigation. Defaults to `true`.
- **zoom** (number) - Optional - The map's display zoom level at the start of simulated navigation. Defaults to 21 (1:282 scale).
- **maxZoom** (number) - Optional - The maximum map display zoom level at the start of simulated navigation. Defaults to 22 (1:141 scale) to prevent overly close views.
```
--------------------------------
### Progress Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'progress' event, which indicates the current loading progress of the map, represented by a progress value.
```javascript
{
type:"progress", // 事件类型
progressBar: 50 //进度值
}
```
--------------------------------
### Building Entered Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'buildingEntered' event, which is triggered when a user enters a building.
```javascript
{
type:"buildingEntered", // 事件类型
buildingID:"xxxxxxx",//进入建筑ID
}
```
--------------------------------
### FMAnimation.start
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Starts the animation.
```APIDOC
## start()
### Description
Starts the animation.
### Method
Method
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```
--------------------------------
### Map Click Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'click' event, providing details about the click location, floor, building, and target map elements.
```javascript
{
type:'click', // 事件类型
level:1,//楼层
buildingID:"1",//建筑ID,园区为null
coords:{x:12619616.66,y:2621878.60}, // 点击到的地图坐标
mouseEvent:{}, // MouseEvent 鼠标事件
targets:[], // 所有点击到的地图节点(按距离排序)
}
```
--------------------------------
### FMSimulateNavigation.simulate
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Starts the simulation of navigation with specified parameters.
```APIDOC
## simulate(long, float)
### Description
Starts the simulation of navigation with specified parameters.
### Method
Method
### Parameters
#### Path Parameters
- **long** (long) - Description
- **float** (float) - Description
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```
--------------------------------
### setStart
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Sets the starting point for a navigation line segment.
```APIDOC
## setStart(int)
### Class
com.fengmap.android.analysis.navi.FMNaviLineMarker.Across
```
--------------------------------
### FMValueAnimation.start
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Starts the value animation.
```APIDOC
## start()
### Description
Starts the value animation.
### Method
Method
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```
--------------------------------
### setStartPoint
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Sets the starting coordinates for navigation.
```APIDOC
## setStartPoint(FMGeoCoord)
### Description
Sets the starting coordinates.
### Class
com.fengmap.android.analysis.navi.FMNavigation
```
--------------------------------
### + shareInstance
Source: https://developer.fengmap.com/docs/ios/v2.5.20/Classes/FMKMapDataManager.html
Gets the data manager instance.
```APIDOC
## + shareInstance
### Description
Gets the data manager instance.
### Method
`+ (instancetype)shareInstance`
### Discussion
Gets the data manager instance.
### Declared In
`FMKMapDataManager.h`
```
--------------------------------
### animationWillStart:key:
Source: https://developer.fengmap.com/docs/ios/v2.5.20/Protocols/FMKAnimationDelegate.html
Called when an animation is about to start, providing the animation object and its key.
```APIDOC
## animationWillStart:key:
### Description
Called when an animation is about to start, providing the animation object and its key.
### Method
`- (void)animationWillStart:(FMKAnimation *)_animation_ key:(NSString *)_key_`
### Parameters
- **animation** (FMKAnimation *) - The animation object.
- **key** (NSString *) - The key of the animation.
### Discussion
Animation will start.
```
--------------------------------
### FMMarkerCluster Click Event Example
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMMarkerCluster.html
Example structure for the 'click' event on a marker cluster. It includes event type, level, building ID, coordinates, the target cluster marker, and an array of markers contained within the cluster.
```json
{
type: 'click', // 事件类型,string类型
level: 1, // 楼层,number类型
buildingID: "1", // 建筑ID,园区为null,string类型
coords: { x: 12619616.66, y: 2621878.60 }, // 点击到的聚合点坐标,object类型
target: dommarker, // 当前聚合点本身,FMDommark对象
markers: [] // 点中的聚合包含marker点数组
}
```
--------------------------------
### setStartPoint
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMNavigationWalk.html
Defines the starting point for navigation, including its coordinates, floor level, and optional marker image.
```APIDOC
## setStartPoint(data, noMarker)
### Description
Sets the starting point for navigation.
### Parameters
* **data** (Object) - Required - Navigation start point parameter object.
* **x** (number) - Required - Map coordinate X of the start point.
* **y** (number) - Required - Map coordinate Y of the start point.
* **level** (number) - Required - Floor level of the start point.
* **buildingID** (string) - Optional - Building ID of the start point. Omit if the start point is not within a building.
* **height** (number) - Optional - Height of the start point from the floor. Defaults to `FMNavigaiton.imageMarkerHeight` if not set.
* **url** (string) - Optional - Path to the marker image for the start point. If not set and an image was previously configured, only the position is updated.
* **size** (number) - Optional - Size of the marker image for the start point. Defaults to 64.
* **anchor** (FMMarkerAnchor) - Optional - Anchor position of the marker. Defaults to BOTTOM.
* **depth** (bool) - Optional - Enable or disable depth rendering. Defaults to false.
* **collision** (bool) - Optional - Enable or disable collision detection. Defaults to false.
* **noMarker** (bool) - Optional - If true or not set, no marker object will be generated for the start point.
### Returns
* **fengmap.FMImageMarker** - The successfully added FMImageMarker object, or null if `noMarker` is true or not set.
```
--------------------------------
### Implement Map Movement Animation in Android
Source: https://developer.fengmap.com/develop-android-guide-animation.html
This example demonstrates how to create and manage a map movement animation. It shows how to get or create an animation object, set an interpolator (e.g., FMBounceInterpolator), duration, and animation listener. The listener handles animation updates, including moving the map between coordinates and updating the map view. It also shows how to destroy the animation object after use.
```Java
FMValueAnimation va = FMAnimationFactory.getFactory().getFMValueAnimation("AnimationName");
if (va == null) {
// 若缓存里面不存在创建新的对象
va = FMAnimationFactory.getFactory().createFMValueAnimation("AnimationName");
// 设置插值为
va.setInterpolator(new FMBounceInterpolator());
// 设置动画的持续时间
va.setDuration(1000);
// 设置动画的监听接口
va.setOnFMAnimationListener(new FMAnimation.OnFMAnimationListener() {
@Override
public void beforeAnimation(String pName) {
// 动画开始前
}
@Override
public void updateAnimationFrame(String pName, Object pLastValue, Object pCurrentValue) {
// 动画更新
FMMapCoord from = (FMMapCoord) pLastValue;
FMMapCoord to = (FMMapCoord) pCurrentValue;
// 不使用方法内置动画
mMap.move(from, to, false);
// 更新
mMap.updateMap();
}
@Override
public void afterAnimation(String pName) {
// 动画结束后
// 可以选择销毁对象
FMAnimationFactory.getFactory().destroyFMValueAnimation(pName);
}
});
}
// 设置开始位置和结束位置
va.ofPosition(start, end);
// 开始动画
va.start();
```
--------------------------------
### Complete Hello Fengmap HTML Example
Source: https://developer.fengmap.com/develop-js-guide-helloFengMap.html
A full HTML file demonstrating the integration of Fengmap SDK, including necessary scripts, styles, and map initialization.
```html
hello Fengmap
```
--------------------------------
### Hello Fengmap Example
Source: https://developer.fengmap.com/develop-js-guide.html
A basic 'Hello Fengmap' code snippet to verify the SDK integration. Click the button to view the details.
```javascript
__Hello Fengmap
```
--------------------------------
### FMEglHelper.start
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Initializes EGL for a given configuration specification.
```APIDOC
## start(FMEglContextWrapper)
### Description
Initializes EGL for a given configuration specification.
### Method
Method
### Parameters
#### Path Parameters
- **FMEglContextWrapper** (FMEglContextWrapper) - Description
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```
--------------------------------
### enable(buildingID) Method
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMFirstPersonControl.html
Enables the first-person controller, optionally specifying a building to start in.
```APIDOC
## enable(buildingID)
### Description
Enables the first-person controller. You can optionally specify a building ID to activate the first-person view within that building.
### Parameters
#### buildingID (string) - Optional
The ID of the building to enable the first-person view in. If null, it defaults to the current map context.
```
--------------------------------
### enterBuilding(options) Method
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMFirstPersonControl.html
Initiates the transition into a specified building with first-person controls.
```APIDOC
## enterBuilding(options)
### Description
Allows the user to enter a specific building, transitioning the view to a first-person perspective within that building.
### Parameters
#### options (json) - Required
Configuration object for entering the building.
- **buildingID** (String) - The ID of the building to enter.
- **isHideOutBuilding** (boolean) - Whether to hide the surrounding campus map during the transition. Defaults to false.
- **finish** (function) - A callback function to be executed upon completion of the transition.
```
--------------------------------
### Map Loaded Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'loaded' event, which is triggered once the map has finished loading all its data.
```javascript
{
type:"loaded", // 事件类型
}
```
--------------------------------
### Level Changed Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'levelChanged' event, indicating a change in the currently focused floor level.
```javascript
{
type:"levelChanged", // 事件类型
level: 2,//楼层
}
```
--------------------------------
### real
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMNavigationWalk.html
Initiates real-time navigation with customizable follow behavior and zoom levels.
```APIDOC
## real(options, callBack)
### Description
Initiates real-time navigation.
### Parameters
#### Path Parameters
- **options** (Object) - Required - Real navigation parameters.
- **followPosition** (boolean) - Optional - Whether the map should center on the position when it changes during real navigation. Defaults to true.
- **followAngle** (boolean) - Optional - Whether the map should follow the direction changes during real navigation, keeping the route facing upwards. Defaults to false.
- **changeTiltAngle** (boolean) - Optional - Whether to change the map's tilt angle and animate it when the floor changes during real navigation. Defaults to true.
- **zoom** (number) - Optional - The map's display zoom level when real navigation starts. Defaults to 21 (1:282 scale).
- **maxZoom** (number) - Optional - The maximum display zoom level when real navigation starts. Defaults to 22 (1:141 scale). Prevents excessively close views.
- **maxOffsetDis** (number) - Optional - Maximum path offset distance in meters. Defaults to 10 meters.
- **completeDistance** (number) - Optional - Distance threshold for determining navigation completion in meters. Defaults to 0 meters from the destination.
- **screenPosition** (object) - Optional - Screen position ratio for the positioning point, e.g., {x:0.5, y:0.75}. By default, the positioning point is at the center of the screen horizontally and 3/4 down vertically.
- **callBack** (function) - Optional - Callback method.
```
--------------------------------
### Start, Pause, Resume, and Stop Navigation
Source: https://developer.fengmap.com/develop-js-guide-routenavi.html
Controls the navigation simulation with methods to start, pause, resume, and stop the navigation process.
```APIDOC
## Start, Pause, Resume, and Stop Navigation
Controls the navigation simulation with methods to start, pause, resume, and stop the navigation process.
```javascript
// Start navigation simulation
avi.simulate();
// Pause navigation
avi.pause();
// Resume navigation
avi.resume();
// Stop navigation
avi.stop();
```
```
--------------------------------
### Start Navigation Analysis (Objective-C)
Source: https://developer.fengmap.com/develop-ios-guide-routenavi.html
Initiate navigation analysis, distinguishing between simulated and actual navigation. For simulated navigation, use `simulateWithSpeed:`, `pause`, `resume`, and `stop`. For actual navigation, use `locate:angle:` with real-time positioning data. Actual navigation optimizes position and provides feedback via callbacks.
```Objective-C
//Start simulated navigation, and set the simulated navigation speed, speed range is 0.4-5.0, unit is meters/second
[_navigation simulateWithSpeed:1.0];
//Pause simulated navigation
//[_navigation pause];
//Resume simulated navigation from pause state, this method must be called to resume from pause state
//[_navigation resume];
//Stop simulated navigation
//[_navigation stop];
//Actual navigation is a navigation tool class used when connecting to a real positioning system. This tool class can perform path constraint optimization on the positioning location,
//correct the positioning point to the drawn path, and return navigation results in callback events: corrected coordinates, remaining distance, angle value
//and text description of the corresponding road section.
//The angle is the angle parameter passed when calling - (BOOL)locate: (FMKGeoCoord)position angle: (CGFloat)angle.
//Actual navigation does not process the angle in any way.
//The angle for correcting the positioning coordinates is the angle passed back by the positioning system, and the internal angle is not processed.
//[_navigation locate:FMKGeoCoordMake(groupID, position) angle:0];
//Each call to this method returns true if navigation analysis is successful, and triggers the navigation callback method.
```
--------------------------------
### real
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMNavigationDrive.html
Initiates real-time navigation. This method configures and starts a navigation session using actual positioning data.
```APIDOC
## real(options, callBack)
### Description
Starts real navigation.
### Parameters
#### Path Parameters
- **options** (Object) - Required - Real navigation parameters.
- **followPosition** (boolean) - Optional - Whether the map should center on the position when it changes during real navigation. Defaults to true.
- **followAngle** (boolean) - Optional - Whether the map should follow the direction changes during real navigation, keeping the route facing upwards. Defaults to false.
- **changeTiltAngle** (boolean) - Optional - Whether to change the map's tilt angle and animate it when the floor changes during real navigation. Defaults to true.
- **zoom** (number) - Optional - The map's display zoom level at the start of real navigation. Defaults to 21 (scale 1:282).
- **maxZoom** (number) - Optional - The maximum display zoom level at the start of real navigation. Defaults to 22 (scale 1:141). Prevents the view from becoming too close.
- **maxOffsetDis** (number) - Optional - Maximum offset distance for the path, in meters. Defaults to 10 meters.
- **completeDistance** (number) - Optional - The distance threshold for determining navigation completion, in meters. Defaults to 0 meters from the destination.
- **screenPosition** (object) - Optional - The screen position ratio of the positioning point, e.g., {x:0.5, y:0.75}. During navigation, the positioning point is at the horizontal center and 3/4 vertical position of the screen. Defaults to the center.
- **callBack** (function) - Optional - Callback method.
```
--------------------------------
### External Model First Loaded Event Example
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMMap.html
Example structure for the 'externalFirstLoaded' event, which fires when an external model is loaded for the first time.
```javascript
{
type:"externalFirstLoaded", // 事件类型
}
```
--------------------------------
### Navigation Start Point Angle Calculation Fix (iOS)
Source: https://developer.fengmap.com/develop-ios-download.html
Fixes an issue with angle calculation failures when the navigation start point is located on a staircase.
```objective-c
修复导航起点位于梯类时导致角度计算失败问题;
```
--------------------------------
### Initialization with Data Path
Source: https://developer.fengmap.com/docs/ios/v2.5.20/Classes/FMKSearchAnalyser.html
Initializes the search analyser using the path to the map data.
```APIDOC
## Method: initWithDataPath:
### Description
Initializes the query using map data.
### Signature
`- (instancetype)initWithDataPath:(NSString *)_dataPath_`
### Parameters
- **dataPath** (NSString) - Path to the Fengmap map data.
### Return Value
An object of type FMKSearchAnalyser.
### Discussion
Initializes the query using map data.
### Declared In
`FMKSearchAnalyser.h`
```
--------------------------------
### FMKPathAnimation Animation Setup
Source: https://developer.fengmap.com/docs/ios/v2.5.20/Classes/FMKPathAnimation.html
Configures the animation parameters including navigation results, repeat count, line width, and line marker.
```APIDOC
## animateWithNaviResults:repeatCount:lineWidth:withLine:
### Description
Sets up the animation parameters, including navigation results, repeat count, line width, and line marker.
### Method
- (void)animateWithNaviResults:(FMKNaviResult *)_result_ repeatCount:(int)_repeatCount_ lineWidth:(double)_lineWidth_ withLine:(FMKLineMarker *)_lineMarker_
### Parameters
- **result** (FMKNaviResult *) - The navigation result defining the path.
- **repeatCount** (int) - The number of times the animation should repeat.
- **lineWidth** (double) - The width of the line, used to calculate interpolation points on the line.
- **lineMarker** (FMKLineMarker *) - The line marker associated with the animation.
### Discussion
Sets the animation parameters.
### Declared In
FMKPathAnimation.h
```
--------------------------------
### Analyze Route with Start and End Options
Source: https://developer.fengmap.com/develop-android-download.html
Perform route analysis using a list of coordinates, along with specified start and end options. This is part of the navigation functionality.
```java
FMNavigation.analyseRoute(ArrayList list,FMPointOption startOption,FMPointOption endOption);
```
--------------------------------
### FMMapEditor Editend Event Example
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMMapEditor.html
This example demonstrates the event object structure upon completion of an editing operation. It contains the event type, editing information, and the edited object.
```javascript
{
type:'editend', // 事件类型
info:{}, // 编辑完成的对象配置信息
object:{}, // 编辑完成的对象
}
```
--------------------------------
### FMMapEditor Drawing Event Example
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMMapEditor.html
This example illustrates the event object structure during an active drawing process. It provides the event type, current drawing information, and the object being drawn.
```javascript
{
type:'drawing', // 事件类型
info:{}, // 绘制中的对象配置信息
object:{}, // 绘制的对象
}
```
--------------------------------
### FMCompositeMarker Constructor
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMCompositeMarker.html
Initializes a new FMCompositeMarker object with specified options. The options parameter allows for detailed configuration of the marker's layout, style, media, text, and other visual properties.
```APIDOC
## new fengmap.FMCompositeMarker(options)
### Description
Initializes a new FMCompositeMarker object.
### Parameters
#### options (json) - Required
Configuration object for the FMCompositeMarker.
- **layout** (json) - View center map coordinates.
- **style** (string) - Defines the visual style of the marker. Possible values include:
- `image`: Displays only an image.
- `text`: Displays only text.
- `limage-rtext`: Image on the left, text on the right.
- `ltext-rimage`: Text on the left, image on the right.
- `timage-btext`: Image on top, text at the bottom.
- `tttext-bimage`: Text on top, image at the bottom.
- `overlay-text`: Text overlaid on an image.
- **align** (string) - Alignment for elements within the marker, dependent on the `style`.
- For `limage-rtext` or `ltext-rimage`: `center`, `top`, `bottom`.
- For `timage-btext` or `tttext-bimage`: `left`, `center`, `right`.
- For `overlay-text`: Specifies alignment for both image and text (e.g., `bottom-right`).
- **spacings** (number) - Spacing between text and image. Default is 0. Effective for styles like `limage-rtext`, `ltext-rimage`, `timage-btext`, `tttext-bimage`.
- **media** (json) - Media information, including images or videos.
- **url** (string) - URL of the image or video. Videos are displayed standalone.
- **size** (Array) - Size of the image or video [width, height]. Default is [32, 32]. Effective for `BILLBOARD` and `FLAT` render modes.
- **image** (json) - Image information (Deprecated in v3.2.4, use `options.media` instead).
- **url** (string) - Image URL.
- **size** (Array) - Image size [width, height]. Default is [32, 32].
- **text** (json) - Text information.
- **padding** (array) - Text padding, default is [0,0,0,0].
- **plateColor** (string) - Background color for the text. Default is none.
- **plateStrokeColor** (string) - Border color for the text background. Default is none.
- **plateStrokeWidth** (number) - Border width for the text background. Default is 1 if `plateStrokeColor` is set.
- **plateOpacity** (number) - Background opacity, between 0 and 1. Default is 1.
- **plateStrokeRadius** (number) - Background corner radius. Default is 0.
- **content** (json) - Text content details.
- **textAlign** (string) - Text alignment (e.g., `fengmap.FMTextAlign.Center`). Default is `fengmap.FMTextAlign.Center`.
- **lineSpacing** (number) - Line spacing. Default is 2.
- **fontSize** (number) - Font size. Default is 20px.
- **fontWeight** (number | string) - Font weight.
- **fontFamily** (string) - Font family.
- **fillColor** (string) - Text fill color (RGB string). Default is "255,0,0".
- **strokeColor** (string) - Text border color (RGB string). Default is '255,255,0'.
- **strokeWidth** (number) - Border stroke width.
- **text** (string | array) - Text content. Use "%rn%" for newlines. If an array, each object can have its own styling.
- **text[].text** (string) - The text content.
- **text[].textAlign** (string) - Text alignment for this line.
- **text[].lineSpacing** (number) - Line spacing for this line.
- **text[].fontSize** (number) - Font size for this line.
- **text[].fontWeight** (number | string) - Font weight for this line.
- **text[].fontFamily** (string) - Font family for this line.
- **text[].fillColor** (string) - Text fill color for this line.
- **text[].strokeColor** (string) - Text border color for this line.
- **text[].strokeWidth** (number) - Border stroke width for this line.
- **x** (number) - X-coordinate of the marker on the map. Default is the floor center coordinate. Required.
- **y** (number) - Y-coordinate of the marker on the map. Default is the floor center coordinate. Required.
- **render** (fengmap.FMMarkerRenderMode) - Rendering mode. Options include `BILLBOARD`, `FIX_BILLBOARD`, `FLAT`, `FIX_FLAT`. Default is `billboard`.
- **rectangle** (fengmap.FMRectangle) - Rectangle boundary object. Required for certain render modes.
- **anchor** (json) - Anchor point information.
- **baseon** (string) - Base element for the anchor (`all`, `image`, `text`).
- **anchor** (fengmap.FMMarkerAnchor) - The anchor point.
- **zoomRange** (array) - Scale zoom level range for the marker. Default is [1, 30].
- **opacity** (number) - Marker opacity (0 to 1). Default is 1.
- **collision** (bool) - Enable/disable collision detection. Default is true. Supported only for `BILLBOARD` render mode.
- **depth** (bool) - Enable/disable depth rendering for text. Default is false.
- **height** (number) - Height above the ground. Default is 1.
- **tilt** (number) - Tilt angle (effective for `FLAT`/`FIX_FLAT` render modes).
- **heading** (number) - Rotation angle (effective for `FLAT`/`FIX_FLAT` render modes).
```
--------------------------------
### FMMapEditor Drawend Event Example
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMMapEditor.html
This example shows the structure of the event object received when a drawing operation is completed. It includes the event type, drawing information, and the drawn object.
```javascript
{
type:'drawend', // 事件类型
info:{}, // 绘制完成的对象配置信息
object:{}, // 绘制的对象
}
```
--------------------------------
### FMLight Constructor
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMLight.html
Initializes a new FMLight object with specified lighting mode and parameters.
```APIDOC
## new fengmap.FMLight(lightMode, light)
### Description
Constructs a new FMLight object.
### Parameters
#### Path Parameters
- **lightMode** (fengmap.FMLightMode) - Required - The lighting mode.
- **light** (json) - Optional - Lighting parameters, only set when lightMode is Custom.
```
--------------------------------
### FMNaviWalkAnalyser Constructor
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMNaviWalkAnalyser.html
Initializes the FMNaviWalkAnalyser with specified options. The success callback is triggered upon successful creation, which is necessary before using the route method.
```APIDOC
## new fengmap.FMNaviWalkAnalyser(options, success, failed)
### Description
Constructs a new FMNaviWalkAnalyser instance.
### Parameters
#### options (object)
- **map** (fengmap.FMMap) - Optional - The map object to use for building the analyzer, which can save memory.
- **mapID** (string) - Optional - The ID of the map.
- **appName** (string) - Optional - The application name created in the Fengmap Cloud backend.
- **key** (string) - Optional - The application key obtained from the Fengmap Cloud backend.
- **mapURL** (string) - Optional - The path to the offline map data resources. Required for NodeJS environments.
- **tile** (boolean) - Optional - Whether to use tiled data. Defaults to true.
#### success (requestCallback)
- Optional - Callback function executed upon successful creation of the analyzer. This callback must be triggered before using the `route` method.
#### failed (requestCallback)
- Optional - Callback function executed if the analyzer creation fails.
```
--------------------------------
### Instance Methods
Source: https://developer.fengmap.com/docs/android/v2.5.13/com/fengmap/android/map/FMGLTextureView.html
Provides access to and control over the OpenGL rendering context and lifecycle.
```APIDOC
## Instance Methods
### `FMEglContextWrapper getCurrentEglContext()`
Returns the current EGL context wrapper associated with this view.
### `FMGLRenderer getRenderer()`
Retrieves the `FMGLRenderer` instance currently set for this view.
### `void onPause()`
Pauses the OpenGL rendering thread. Should be called when the view is no longer visible or active.
### `void onResume()`
Resumes the OpenGL rendering thread. Should be called when the view becomes visible and active.
### `void onSurfaceTextureAvailable(android.graphics.SurfaceTexture surface, int width, int height)`
Called when the SurfaceTexture is available for rendering. Initializes the OpenGL environment.
### `boolean onSurfaceTextureDestroyed(android.graphics.SurfaceTexture surface)`
This will be called when windows detached. Called when the SurfaceTexture is being destroyed. Cleans up OpenGL resources.
### `void onSurfaceTextureSizeChanged(android.graphics.SurfaceTexture surface, int width, int height)`
Called when the size of the SurfaceTexture changes. Adjusts the OpenGL viewport.
### `void onSurfaceTextureUpdated(android.graphics.SurfaceTexture surface)`
Called for each frame rendered to the SurfaceTexture.
### `void queueEvent(java.lang.Runnable r)`
Queues a `Runnable` to be executed on the OpenGL rendering thread.
### `void requestRender()`
Requests that the view be re-rendered.
### `void requestRenderAndWait()`
Waits until the render command is sent to OpenGL before returning. Use with caution to avoid blocking the UI thread.
### `void setOnCreateGLContextListener(com.fengmap.android.map.FMGLThread.OnCreateGLContextListener onCreateGLContextListener)`
Sets a listener to be notified when the GL context is created.
### `void setRenderer(FMGLRenderer renderer)`
Sets the `FMGLRenderer` responsible for drawing the OpenGL scene.
### `void setRenderMode(FMViewRenderMode mode)`
Sets the rendering mode for the view (e.g., continuous or when requested).
```
--------------------------------
### Add Start and End Markers on Fengmap
Source: https://developer.fengmap.com/develop-js.html
Adds image markers to represent the start and end points of a route on the map. It retrieves the appropriate layer and creates an FMImageMarker with a specified URL and size.
```javascript
//添加起点终点marker
function addMarker(coord, type) {
//获取目标点层
var group = map.getFMGroup(coord.groupID);
//创建marker,返回当前层中第一个imageMarkerLayer,如果没有,则自动创建
var layer = group.getOrCreateLayer('imageMarker');
var markerUrl = '';
if (type === 'start') {
markerUrl = 'images/start.png';
} else {
markerUrl = 'images/end.png';
}
//图标标注对象,默认位置为该楼层中心点
var im = new fengmap.FMImageMarker({
x: coord.x,
y: coord.y,
//设置图片路径
url: markerUrl,
//设置图片显示尺寸
size: 32,
//marker标注高度
height: 2,
callback: function () {
//设置 "一直可见",不参与避让
//im.alwaysShow();
}
});
//添加imageMarker
layer.addMarker(im);
}
```
--------------------------------
### Add Map Overlays
Source: https://developer.fengmap.com/develop-android.html
Initializes various map layers including text, image, location, line, and polygon layers. This setup is typically done after the map is successfully initialized.
```java
private FMMap mFMMap;
private FMTextLayer mTextLayer;
private FMImageLayer mImageLayer;
private FMLineLayer mLineLayer;
private FMLocationLayer mLocationLayer;
private FMPolygonLayer mPolygonLayer;
/**
* 加载地图数据
*/
private void openMap() {
FMMapView mapView = (FMMapView) findViewById(R.id.map_view);
mFMMap = mapView.getFMMap();
mFMMap.setOnFMMapInitListener(this);
//打开Fengmap服务器上的地图数据10347
String mapId = "10347";
mFMMap.openMapById(mapId, true);
}
@Override
public void onMapInitSuccess(String path) {
//地图焦点层
int groupId = mFMMap.getFocusGroupId();
//添加文字图层
mTextLayer = mFMMap.getFMLayerProxy().getFMTextLayer(groupId);
//添加图片图层
mImageLayer = mFMMap.getFMLayerProxy().getFMImageLayer(groupId);
//添加定位图层
mLocationLayer = mFMMap.getFMLayerProxy().getFMLocationLayer();
//添加线图层
mLineLayer = mFMMap.getFMLayerProxy().getFMLineLayer();
//不规则图形图层
mPolygonLayer = mFMMap.getFMLayerProxy().getFMPolygonLayer(groupId);
}
// 添加文字标注
private void addTextMarker() {
//文字标注所在地图坐标
FMMapCoord position = new FMMapCoord(1.296164E7, 4861845.0);
FMTextMarker textMarker = new FMTextMarker(position, "添加一个文字标注");
textMarker.setTextFillColor(Color.RED);
textMarker.setTextStrokeColor(Color.RED);
textMarker.setTextSize(30);
//设置文字偏移高度
textMarker.setFMTextMarkerOffsetMode(FMTextMarker.FMTextMarkerOffsetMode.FMNODE_CUSTOM_HEIGHT);
textMarker.setCustomOffsetHeight(5);
mTextLayer.addMarker(textMarker);
}
//添加图片标注
private void addImageMarker() {
//图片标注所在地图坐标
FMMapCoord position = new FMMapCoord(1.296164E7, 4861845.0);
FMImageMarker imageMarker = new FMImageMarker(position, R.drawable.ic_launcher);
//设置图片宽高
imageMarker.setMarkerWidth(30);
imageMarker.setMarkerHeight(30);
//设置图片垂直偏离距离
imageMarker.setFMImageMarkerOffsetMode(FMImageMarker.FMImageMarkerOffsetMode.FMNODE_CUSTOM_HEIGHT);
imageMarker.setCustomOffsetHeight(5);
mImageLayer.addMarker(imageMarker); //添加图片标注
}
//添加定位标注
private void addLocationMarker() {
FMMapCoord position = new FMMapCoord(1.296164E7, 4861845.0);
FMLocationMarker locationMarker = new FMLocationMarker(mFMMap.getFocusGroupId(), position);
//设置定位点图片
locationMarker.setActiveImageFromRes(R.drawable.ic_launcher);
//设置定位图片宽高
locationMarker.setMarkerWidth(30);
locationMarker.setMarkerHeight(30);
mLocationLayer.addMarker(locationMarker);
}
//添加线
private void addLineMarker() {
//模拟线段的点数据
ArrayList points = new ArrayList() {
{
add(new FMMapCoord(12961602, 4861851.5, 56));
add(new FMMapCoord(12961625, 4861850.5, 56));
add(new FMMapCoord(12961625, 4861825.0, 56));
}
};
//线段的节点
ArrayList segments = new ArrayList<>(1);
FMSegment segment = new FMSegment(mFMMap.getFocusGroupId(), points);
segments.add(segment);
FMLineMarker lineMarker = new FMLineMarker(segments);
mLineLayer.addMarker(lineMarker);
}
//添加多边形
private void addPolygonMarker() {
ArrayList points = new ArrayList() {
{
add(new FMMapCoord(1.2961583E7, 4861865.0, 0.0));
add(new FMMapCoord(1.2961644E7, 4861874.0, 0.0));
add(new FMMapCoord(1.2961680E7, 4861854.0, 0.0));
add(new FMMapCoord(1.2961637E7, 4861819.0, 0.0));
}
};
}
```
--------------------------------
### Initialization
Source: https://developer.fengmap.com/docs/ios/v2.5.20/Classes/FMKLocationMarker.html
Initializes an FMKLocationMarker with specified pointer and dome image names. These images should be placed in the FMBundle.
```APIDOC
## initWithPointerImageName:DomeImageName:
### Description
Initializes a location marker with custom pointer and dome images.
### Method
- (instancetype)initWithPointerImageName:(NSString *)_pName_ DomeImageName:(NSString *)_dName_
### Parameters
- **_pName_** (NSString) - The name of the pointer image (e.g., "pointer.png").
- **_dName_** (NSString) - The name of the dome image (e.g., "dome.png").
### Return Value
An initialized FMKLocationMarker object.
### Discussion
Resource images for the location marker need to be placed in the FMBundle. You can also replace the default images.
### Declared In
`FMKLocationMarker.h`
```
--------------------------------
### FMNaviObstruction
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMLineMarker.html
Placeholder for FMNaviObstruction documentation.
```APIDOC
## fengmap.FMNaviObstruction
```
--------------------------------
### fengmap.FMNavigationWalk.setStartPoint
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMOverviewMode.html
Sets the starting point for the navigation.
```APIDOC
## fengmap.FMNavigationWalk.setStartPoint
### Description
Sets the starting point for the navigation.
### Method
`setStartPoint(point)`
### Parameters
* **point** (object) - Required - The starting point {x, y}.
```
--------------------------------
### setStartPoint
Source: https://developer.fengmap.com/docs/js/v3.2.0/fengmap.FMNavigationWalk.html
Defines the starting point for navigation, optionally including a visual marker. Developers can customize marker properties like image, size, and anchor.
```APIDOC
## setStartPoint(data, noMarker)
### Description
Sets the starting point for navigation.
### Parameters
#### Parameters
- **data** (Object) - Required - Navigation start point parameter object.
- **x** (number) - Required - The X coordinate of the start point on the map.
- **y** (number) - Required - The Y coordinate of the start point on the map.
- **level** (number) - Required - The floor level of the start point.
- **buildingID** (string) - Optional - The building ID for the start point. Omit if the start point is not within a building.
- **height** (number) - Optional - The height of the start point coordinate from the floor. If not set, `FMNavigation.imageMarkerHeight` is used.
- **url** (string) - Optional - The path to the marker image for the start point. If omitted and a previous image was set, only the position is updated.
- **size** (number) - Optional - The size of the marker image for the start point. Defaults to 64.
- **anchor** (FMMarkerAnchor) - Optional - The anchor position for the marker. Defaults to `BOTTOM`.
- **depth** (bool) - Optional - Enables or disables depth rendering. Defaults to `false`.
- **collision** (bool) - Optional - Enables or disables collision detection. Defaults to `false`.
- **noMarker** (bool) - Optional - If set to `true` or omitted, no marker object will be generated for the start point.
### Returns
- **fengmap.FMImageMarker** - Returns the successfully added `FMImageMarker` object. Returns `null` if `noMarker` is not set or is `true`.
```
--------------------------------
### fengmap.FMNavigationDrive.setStartPoint
Source: https://developer.fengmap.com/docs/wxapp/v3.2.0/fengmap.FMOverviewMode.html
Sets the starting point for the navigation.
```APIDOC
## fengmap.FMNavigationDrive.setStartPoint
### Description
Sets the starting point for the navigation.
### Method
`setStartPoint(point)`
### Parameters
* **point** (object) - Required - The starting point {x, y}.
```
--------------------------------
### FMEglHelper.swap
Source: https://developer.fengmap.com/docs/android/v2.5.13/index-files/index-18.html
Displays the current render surface.
```APIDOC
## swap()
### Description
Displays the current render surface.
### Method
Method
### Request Example
```
// Example usage not provided in source
```
### Response
#### Success Response (200)
- **void** (void) - Description
### Response Example
```
// Example usage not provided in source
```
```