VisioMove Essential (Android)  1.21.0

◆ updatePlaceData()

void updatePlaceData ( JSONObject  pData)

Update the place data content within the map.

This should be called within the listeners::VMELifeCycleListener::mapDidInitializeEngine(VMEMapView) notification.

Parameters
pDataA JSONObject object that contains the updated place data. For the expected format, please see Place data format.
Example
@Override
public void mapDidInitializeEngine(VMEMapView pMapView) {
// This is where the place data update must take place (the only moment where the map
// view can take the data into account).
try {
// The data comes from the visio_island_cms_update.json in the raw resources.
InputStream resourceReader = getResources().openRawResource(R.raw.visio_island_cms_update);
Writer writer = new StringWriter();
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(resourceReader, "UTF-8"));
String line = reader.readLine();
while (line != null) {
writer.write(line);
line = reader.readLine();
}
} catch (Exception e) {
}
finally {
try {
resourceReader.close();
}
catch (Exception e) {
}
}
String lJsonString = writer.toString();
pMapView.updatePlaceData(new JSONObject(lJsonString).getJSONObject("locale").getJSONObject("en"));
}
catch (JSONException e) {
}
}
Version
1.0
Visioglobe® 2015-2020