List of usage examples for com.google.gwt.gdata.client.maps FeatureEntry updateEntry
public final native void updateEntry(Callback<E> callback) ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsUpdateMapFeatureDemo.java
License:Apache License
/** * Update a map feature by making use of the updateEntry * method of the Entry class./*w w w .j a v a2s .co m*/ * Set the feature's title to an arbitrary string. Here * we prefix the title with 'GWT-Maps-Client' so that * we can identify which features were updated by this demo. * On success and failure, display a status message. * * @param targetFeature The feature entry which to update */ private void updateFeature(FeatureEntry targetFeature) { showStatus("Updating map feature...", false); targetFeature.setTitle(Text.newInstance()); targetFeature.getTitle().setText("GWT-Maps-Client - updated feature"); targetFeature.updateEntry(new FeatureEntryCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while updating a map feature: " + caught.getMessage(), true); } public void onSuccess(FeatureEntry result) { showStatus("Updated a map feature.", false); } }); }