Maps Data API update post requests receive an Unsupported Request error.

12 views
Skip to first unread message

mealmate

unread,
Oct 11, 2009, 7:11:07 AM10/11/09
to Google Maps Data API
Hello,

I started playing around with the Google Maps Data API using the Java
examples in the Google Maps Data API Java developer guide.

I am using the code verbatim replacing my user ID and Map ID where
appropriate. All the code snippets work except the two that involve
updating existing data namely:

Updating Maps
Updating Map Features

For both these two cases I receive the following.

com.google.gdata.util.NotImplementedException: Not Implemented
<HTML><HEAD>
<TITLE>Unsupported Request</TITLE>
</HEAD><BODY>
<H1>Unsupported Request</H1>
PUT to
http&#58;&#47;&#47;maps&#46;google&#46;com&#47;maps&#47;feeds&#47;maps&#47;214290070838750383743&#47;000475a60b2620571a057&#47;full
not supported.<P>
Reference&#32;&#35;8&#46;58fe077&#46;1255258841&#46;4a2259d
</BODY></HTML>

at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse
(HttpGDataRequest.java:573)
at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse
(GoogleGDataRequest.java:543)
at com.google.gdata.client.http.HttpGDataRequest.checkResponse
(HttpGDataRequest.java:536)
at com.google.gdata.client.http.HttpGDataRequest.execute
(HttpGDataRequest.java:515)
at com.google.gdata.client.http.GoogleGDataRequest.execute
(GoogleGDataRequest.java:515)
at com.google.gdata.client.Service.update(Service.java:1482)
at com.google.gdata.client.Service.update(Service.java:1448)
at com.google.gdata.client.GoogleService.update(GoogleService.java:
583)
at com.fusion.vision.gdata.GetMapsFeed.updateMap(GetMapsFeed.java:
145)
at com.fusion.vision.gdata.GetMapsFeed.main(GetMapsFeed.java:33)


The code snippets that create/retrieve/delete maps and create/retrieve/
delete features works fine just the updates fail.

Here is the code I am using to attempt to update the Map Title as per
the code example in the dev guide:

public static MapEntry updateMap(MapsService myService)
throws ServiceException, IOException {

// Use the map entry's post (edit) URL

final URL editMapUrl = new URL("http://maps.google.com/maps/feeds/
maps/214290070838750383743/full/000475a60b2620571a057");
// Create a MapEntry object and replace the title to 'Demo Map 2'
MapEntry myEntry = new MapEntry();
myEntry.setTitle(new PlainTextConstruct("Demo Map 2"));
return myService.update(editMapUrl, myEntry);
}

Any help would be much appreciated.

bart (Google Employee)

unread,
Oct 20, 2009, 12:30:08 PM10/20/09
to Google Maps Data API
you need to supply a whole entry for an update.

in this case, you should read the existing one, set *its* title, and
do the update.
Reply all
Reply to author
Forward
0 new messages