Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Failed to Batch-Update a map
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
JZarzuela  
View profile  
 More options Jan 19 2012, 7:10 pm
From: JZarzuela <jzarzu...@gmail.com>
Date: Thu, 19 Jan 2012 16:10:28 -0800 (PST)
Local: Thurs, Jan 19 2012 7:10 pm
Subject: Failed to Batch-Update a map

Hi,

I've been looking for an anwser for the following issue without luck:

I'm able to update any FeatureEntry of my maps using "regular" update calls
(mapService.update(featureEditUrl, featureEntry)). And I'm able to insert
new entries with batch calls too. But, it fails when I try to update them
in a batch call.

The response is always "OK" but the content is left unchanged.

Any help would appreciated.

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bart (Google Employee)  
View profile  
 More options Jan 20 2012, 7:36 pm
From: "bart (Google Employee)" <drb...@gmail.com>
Date: Fri, 20 Jan 2012 16:36:23 -0800 (PST)
Local: Fri, Jan 20 2012 7:36 pm
Subject: Re: Failed to Batch-Update a map
Can you post an example of the batch command you're sending, and the
URL you're sending it to?

On Jan 19, 4:10 pm, JZarzuela <jzarzu...@gmail.com> wrote:

> Hi,

> I've been looking for an anwser for the following issue without luck:

> I'm able to update any FeatureEntry of my maps using "regular" update calls
> (mapService.update(featureEditUrl, featureEntry)). And I'm able to insert
> new entries with batch calls too. But, it fails when I try to update them
> in a batch call.

> The response is always "OK" but the content is left unchanged.

Are the per-entry responses OK as well? A batch POST should always
return overall success, with per-entry responses as part of the
response.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
JZarzuela  
View profile  
 More options Jan 22 2012, 2:35 pm
From: JZarzuela <jzarzu...@gmail.com>
Date: Sun, 22 Jan 2012 11:35:47 -0800 (PST)
Local: Sun, Jan 22 2012 2:35 pm
Subject: Re: Failed to Batch-Update a map

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.

/****** JAVA CODE *****/
MapsService myService = new MapsService("yourCo-yourAppName-v1");
myService.setUserCredentials(user,pwd);
batchUpdateMap (myService);

private void batchUpdateMap(MapsService myService) throws ServiceException,
IOException {

        // Request feature info
        FeatureFeed feed1 = new FeatureFeed();
        FeatureEntry entry1 = new FeatureEntry();

entry1.setId("http://maps.google.com/maps/feeds/features/212026791974164037226/0004...");
        BatchUtils.setBatchId(entry1, "Batch-Id-Query-1");
        BatchUtils.setBatchOperationType(feed1, BatchOperationType.QUERY);
        feed1.getEntries().add(entry1);
        final URL batchMapUrl = new
URL("http://maps.google.com/maps/feeds/features/212026791974164037226/0004...");
        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();

kml.setBlob("<Placemark><name>changedPOI</name><description/><Style
id=\"style11\"><IconStyle><Icon><href>http://maps.gstatic.com/mapfiles/ms2/micons/blue-dot.png</href></Icon></IconStyle></Style><Point><coordinates>-5.812011,42.21244,0. 0</coordinates></Point></Placemark>");
            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());
        }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »