I have created a public map called "test-map" to test this. I'm using a Java class to create the test. The method's code is at the end of this response.
The return code, overall and for every entry is "success". But the map and POIs remain unchanged.
Note: I know that there are specific methods for getting "URLs" but I checked that they are what I'm using in the test.
private void batchUpdateMap(MapsService myService) throws ServiceException, IOException {
// Request feature info
FeatureFeed feed1 = new FeatureFeed();
FeatureEntry entry1 = new FeatureEntry();
BatchUtils.setBatchId(entry1, "Batch-Id-Query-1");
BatchUtils.setBatchOperationType(feed1, BatchOperationType.QUERY);
feed1.getEntries().add(entry1);
FeatureFeed result = myService.batch(batchMapUrl, feed1);
// Iterates resulting feed adding entries to a new feed for updating. Note: There should be just one entry
FeatureFeed updatingFeed = new FeatureFeed();
for (FeatureEntry entry : result.getEntries()) {
// Traces some info
String batchId = BatchUtils.getBatchId(entry);
BatchStatus status = BatchUtils.getBatchStatus(entry);
System.out.println("Batch operation: " + batchId + " status (" + status.getReason() + ") " + status.getContent());
// Creates a new entry from previous one and updates it
FeatureEntry updatingEntry = new FeatureEntry(entry);
updatingEntry.setTitle(new PlainTextConstruct("changedPOI"));
XmlBlob kml = new XmlBlob();
updatingEntry.setKml(kml);
BatchUtils.setBatchId(updatingEntry, "Batch-Id-Update-1");
BatchUtils.setBatchOperationType(updatingEntry, BatchOperationType.UPDATE);
updatingEntry.setSummary(new PlainTextConstruct("updating info"));
// Adds it to the feed
updatingFeed.getEntries().add(updatingEntry);
}
// Sends the batch updating request
result = myService.batch(batchMapUrl, updatingFeed);
// Iterates the result again showing the status
for (FeatureEntry entry : result.getEntries()) {
// Traces some info
String batchId = BatchUtils.getBatchId(entry);
BatchStatus status = BatchUtils.getBatchStatus(entry);
System.out.println("Batch operation: " + batchId + " status (" + status.getReason() + ") " + status.getContent());
}
}