VisioMove Essential (Android)  1.27.6

◆ addPlace() [1/2]

boolean addPlace ( String  placeID,
Uri  imageURL,
JSONObject  data,
VMEPosition  position 
)

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
Returns
true if the place was successfully added to the map, otherwise false.
Note
When using this method, the other properties of the object are initialized to appropriate values:
See also
VMEMapView::addPlace(String,Uri,JSONObject,VMEPosition,VMEPlaceSize,VMEPlaceAnchorMode,VMEPlaceAltitudeMode,VMEPlaceDisplayMode,VMEPlaceOrientation,VMEPlaceVisibilityRamp)
Note
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, new VMESceneContext()));
Version
1.1
© 2022 Copyright Visioglobe, All Rights Reserved. View our Privacy Policy