SuperMap GIS Basic Products Mobile GIS FAQ Collection (4)

SuperMap GIS Basic Products Mobile GIS FAQ Collection (4)

【iMobile】【11.1.0】How does iMobile construct a coordinate system through EPSGCode?

[Solution] Create it through the construction method of PrjCoordSys, for example, create a coordinate system with EPSGCode 4326: PrjCoordSys prjCoordSys = new PrjCoordSys(4326)

【iMobile】【11.1.0】How does iMobile query whether a data set contains a certain field?

[Solution] Use the FieldInfos.contains(String name) method to query whether a field exists.

【iMobile】How does iMobile obtain the device ID to apply for a license?

[Solution] Obtain the device ID through environment.getDeviceID(). When obtaining it, you need to pay attention to: 1. The wifi permission of the device must be enabled; 2. The targetSDKVersion version is not higher than 28.

【iMobile】After clearing and releasing the dynamic layer, the zoom map app will crash. What is the reason?

[Cause of the problem] The dynamic layer is released, but it is not removed from the MapView

[Solution] The dynamic layer needs to be removed after release: MapView.removeAllDynamicView();

[iMobile] The text in the CAD dataset is not displayed, the text color is black, and the map background color is white. How to solve it?

[Solution] Set the CAD text to be drawn in POI mode: map.setDrawCADTextAsPOI(true)

【iMobile】【11.1.0】When loading the online map service, the text annotation is blurred, how to solve it?

[Solutions] 1. If you are publishing map tiles, you can set the compression rate parameter to 90 when generating the cache, and set the DPI to a higher value, such as DPI=200, and then load it on the mobile terminal. 2. If it is the published original workspace data, you can set the following two methods: mMapControl.getMap().setHighDefinitionMode(true);
mMapControl.getMap().setHighDefinitionScale(0.5f)

【iMobile】How to close the map, map control and workspace? What is the sequence of closing?

[Solution] 1. Close the Map object 2. Close the MapControl object 3. Close the Workspace object

【iMobile】How to implement the click event after adding point objects to the tracking layer?

[Solution] Set the gesture recognizer through MapControl.setGestureDetector(android.view.GestureDetector gsDetector), and obtain the object ID that satisfies the condition through the TrackingLayer.hitTest() method in the listening event.

【iMobile】How does iMobile save the workspace?

[Solution] Obtain the workspace connection information WorkspaceConnectionInfo through Workspace, then set the workspace type and workspace path, and use the Workspace.save() method to save it.

【iMobile】An exception is thrown after saving the workspace. What is the reason?

[Problem reason] 1. The current workspace object has been released; 2. The workspace is newly created, and the save path is not specified; 3. The directory where the specified save file is located does not exist, and the directory will be created automatically, but the creation fails; 4. The path to save the file is specified, but the file extension name is not a valid workspace type, and the workspace type is not specified;

[Solution] Check the causes of the above problems.

【iMobile】How to modify a node after drawing a line on the map?

[Solution] 1. Set the layer to be editable and selectable 2. Set the object operation type to selectable 3. Set the object operation type to edit node 4. After editing, submit the editing results through the mapControl.submit() method.

【iMobile】How to import kml files on the mobile terminal?

[Solution] You can import kml files through DataConversion.importKML().

【iMobile】How to obtain the map coordinates clicked by the finger on the mobile terminal?

[Solution] Obtain the pixel coordinates Point clicked by the finger through the click event, and then convert the pixel coordinates to map coordinates through the map.pixelToMap(Point point) method.
【iMobile】Draw a circle object on the map by constructing geometric objects. The set radius is obviously small, but it is displayed on the map. What is the reason?

[Solution] This is because the map coordinate system is a geographic coordinate system, and the size of the geometric object has no unit at all, and the set digital unit is determined according to the map coordinate system. If the map coordinate system unit is degree, then the set radius unit is also degree, and the value converted from degree to meter needs to be set as the radius of the geometric object.

【iMobile】How to set EngineType for loading xyz type service?

[Solution] When defining the data source connection information, set the engine type of the data source connection: DatasourceConnectionInfo.setEngineType(EngineType.XYZTILE)
[iMobile] This is how the coordinate points in the projected coordinate system are converted into latitude and longitude?

【解决办法】CoordSysTranslator.convert(points, new PrjCoordSys(3857), new PrjCoordSys(4326), new CoordSysTransParameter(), CoordSysTransMethod.China_2D_4P);

[iMobile] The result of dividing a line with geometrist.splitLine is still a line

[Problem reason] The vertical foot distance from the point to the line is greater than the tolerance value, and the point object used for interruption is considered invalid, so the interruption will not be performed.

[Solution] Set the tolerance value to be smaller than the vertical foot distance from the point to the line

【iMobile】geoline.getlength method to get the length of the line is very short

[Cause of the problem] The geoline.getlength method is used to return the length of the line geometry object, and its value is the sum of the lengths of each sub-object

[Solution] Use geometrist.computeGeodesicLength(Geometry geometry, PrjCoordSys prjCoordSys), which is used to calculate the length of the object in the coordinate system

[iMobile] Editing and adding objects to the data set and then saving the data crashes

[Problem Cause] The logic sequence of data processing is incorrect

[Solution] Close the recordset first and then close the data set

【iMobile】How to obtain majorAxis and flatten for computeGeodesicDistance method parameters

[Solution] The majorAxis and flatten in this method are parameters in the geographic coordinate system, which can be obtained by the GeoSpheroid earth ellipsoid parameter class, and the object is obtained by the getGeoSpheroid() method of the GeoDatum object. Similarly, GeoDatum is obtained from the GeoCoordSys geographic coordinate system object by the getGeoDatum() method, and finally is obtained from the PrjCoordSys projected coordinate system object by using getGeoCoordSys() Returns a geographic coordinate system object for a projected coordinate system. This projected coordinate system object can be obtained from a map or dataset

[iMobile] The track recording function crashes, and the track record setting GPS data prompt: GeoPoint cannot be converted to GeoLine

[Cause of the problem] The road capture data set used contains points, which causes an exception to be thrown when receiving geopoints with geoline after the road capture is enabled.

【Solution】Delete the non-linear data set in the set road capture data source

Guess you like

Origin blog.csdn.net/supermapsupport/article/details/131823738