VisioMove Essential (Android)  1.27.6

◆ addPlace() [2/2]

boolean addPlace ( String  placeID,
Uri  imageURL,
JSONObject  data,
VMEPosition  position,
VMEPlaceSize  size,
VMEPlaceAnchorMode  anchorMode,
VMEPlaceAltitudeMode  altitudeMode,
VMEPlaceDisplayMode  displayMode,
VMEPlaceOrientation  orientation,
VMEPlaceVisibilityRamp  visibilityRamp 
)

Adds a dynamic place to the map.

Parameters
placeIDThe ID of the place. If the ID corresponds to an existing dynamic place, then it will be replaced. If the ID corresponds with a static place ID, then this call will fail.
imageURLA URL that references an image that will be used to represent the place within the map.
dataA data object for populating the place information. For the expected format, please see Place data format.
positionThe place's position within the map
sizeControls the place's size
anchorModeDetermines how the place will be anchored to the map.
altitudeModeDetermines how to interpret the altitude attribute of the position parameter.
displayModeDetermines how the place is displayed
orientationControls the place's orientation
visibilityRampControls the place's visibility
Returns
true if the place was successfully added to the map, otherwise false.
Note
This method will only work if called during or after the listeners::VMELifeCycleListener::mapDidLoad(VMEMapView) callback method. It will not work if called within the listeners::VMELifeCycleListener::mapDidInitializeEngine(VMEMapView).
Applies to:
  • dynamic places
JSONObject lPlaceData = null;
try {
lPlaceData = new JSONObject();
lPlaceData.put("name", "Cat tracker");
lPlaceData.put("description", "https://en.wikipedia.org/wiki/Cat");
lPlaceData.put("icon", "http://www.clipartbest.com/cliparts/aTe/K4e/aTeK4en8c.png");
JSONArray list = new JSONArray();
list.put("2");
list.put("3");
list.put("99");
lPlaceData.put("categories", list);
}
catch (JSONException e) {
e.printStackTrace();
}
Uri lIconUri = Uri.parse("http://www.clipartbest.com/cliparts/aTe/K4e/aTeK4en8c.png");;
mMapView.addPlace("cat_tracker_id",
lIconUri,
lPlaceData,
new VMEPosition(45.74131, 4.88216, 0.0, null, null),
new VMEPlaceSize(50.0f),
VMEPlaceAnchorMode.BOTTOM_CENTER,
VMEPlaceAltitudeMode.RELATIVE,
VMEPlaceDisplayMode.OVERLAY,
VMEPlaceOrientation.newPlaceOrientationFacing(),
new VMEPlaceVisibilityRamp());
Version
1.19
© 2022 Copyright Visioglobe, All Rights Reserved. View our Privacy Policy