My code is as follows. The map creation part works correctly because I can see the map has been created. I got 'mid' from a MapEntry returned by map creation.
// Create a blank FeatureEntry object FeatureEntry featureEntry = new FeatureEntry();
try { // KML is simply XML so we'll use the XmlBlob object to store it XmlBlob kml = new XmlBlob();
kml.setBlob(KML);
// Set the KML for this feature // Note that the KML should only include one <Placemark> entry featureEntry.setKml(kml);
// Set the tile for the feature. Each atom entry requires a feature
// This feature title will be displayed within My Maps featureEntry.setTitle(new PlainTextConstruct(addr)); } catch(NullPointerException e) { throw new ServiceException("Null Pointer");
}
// Insert the feature entry using the #post URL return service.insert(featureEditUrl, featureEntry); }
Roman N
unread,
Sep 21, 2009, 5:58:56 PM9/21/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-map...@googlegroups.com
Hi,
Have you tried adding the KML namespace to the <Placemark>? i.e.
>
> and paste the HTTP POST body sent?
>
> Thanks,
> Roman
>
> On Mon, Sep 21, 2009 at 4:38 PM, chuang liu <liuchuan...@gmail.com> wrote:
> > Is there a way I can tell if it is a problem with the map URL or a problem
> > with KML string?
>
> > Thanks.
>
> > chuang
>
> > On Mon, Sep 21, 2009 at 4:17 PM, chuang liu <liuchuan...@gmail.com> wrote:
>
> >> Hi Roman:
>
> >> Thanks for your reply. I tried with and without the namespace, and both
> >> failed.
>
> >> Regards
>
> >> Chuang
>
> >> On Mon, Sep 21, 2009 at 2:58 PM, Roman N <api.roman.pub...@gmail.com>wrote:
>
> >>> Hi,
>
> >>> Have you tried adding the KML namespace to the <Placemark>? i.e.
>
> >>> <Placemark xmlns="http://www.opengis.net/kml/2.2">
>
> >>> Thanks,
> >>> Roman
>
> >>> On Mon, Sep 21, 2009 at 11:52 AM, chuang liu <liuchuan...@gmail.com>wrote:
>
> >>>> Hi:
>
> >>>> I tried to insert to a new feature to a newly created map by following
> >>>> the example on