Note that there are some explanatory texts on larger screens.

plurals
  1. POCant get Maps featureFeed to work
    primarykey
    data
    text
    <p>I am having a real issue retrieving map features from the features feed through the new java api on Android. Although i can get a featrureFeed containing an id and title (from a specific MapFeed), as soon as i add in FeatureContent to the request (for getting the placemark details) FeatureFeed.executeGet() returns with a '400 bad request' error. Am i doing something wrong, or is there actually an error with this at the moment? Below is some of my code - any information would be greatly appreciated as i've been banging my head against this for 3 days! (i've tried "kml:placemark", "atom:placemark" and "placemark" in the FeatureContent class)</p> <p><pre><code> public class FeatureFeed { @Key("atom:id") public String id; @Key("atom:title") public String title; @Key("atom:entry") public List features; </p> <pre><code>public List&lt;FeatureEntry&gt; maps = new ArrayList&lt;FeatureEntry&gt;(); public static FeatureFeed executeGet( HttpTransport transport, BuildMapsUrl url) throws IOException { url.fields = GData.getFieldsFor(FeatureFeed.class); AtomParser parser = new AtomParser(); parser.namespaceDictionary = Namespace.FEED_NAMESPACE_DICTIONARY; transport.addParser(parser); HttpRequest request = transport.buildGetRequest(); request.url = url; return (FeatureFeed) RedirectHandler. execute(request).parseAs(FeatureFeed.class); } </code></pre> <p>}</p> <p>public class FeatureEntry implements Cloneable { @Key("atom:id") public String id; @Key("atom:title") public String title; @Key("atom:content") public FeatureContent content;</p> <p>public FeatureEntry() { // required } public FeatureEntry(String title, FeatureContent content) { this.title = title; this.content = content; } }</p> <p>public class FeatureContent implements Cloneable { </p> <p>@Key("@type") public String contentType = "application/vnd.google-earth.kml+xml";</p> <p>@Key ("kml:Placemark") // adding this always fails with Bad Request<br> public FeaturePlaceMark placemark; // adding this always fails with Bad Request</p> <p>public FeatureContent() { //required }</p> <p>public FeatureContent(FeaturePlaceMark placemark) { this.placemark = placemark; } }</p> <p>FEED_NAMESPACE_DICTIONARY.namespaceAliasToUriMap; feedMap.put("", "http://www.w3.org/2005/Atom"); feedMap.put("kml", "http://www.opengis.net/kml/2.2"); feedMap.put("atom", "http://www.w3.org/2005/Atom"); feedMap.put("exif", "http://schemas.google.com/photos/exif/2007"); feedMap.put("gd", "http://schemas.google.com/g/2005"); feedMap.put("gm", "http://schemas.google.com/g/2008#mapfeature"); feedMap.put("geo", "http://www.w3.org/2003/01/geo/wgs84_pos#"); feedMap.put("georss", "http://www.georss.org/georss"); feedMap.put("gml", "http://www.opengis.net/gml"); feedMap.put("gphoto", "http://schemas.google.com/photos/2007"); feedMap.put("media", "http://search.yahoo.com/mrss/"); feedMap.put("openSearch", "http://a9.com/-/spec/opensearch/1.1/"); feedMap.put("xml", "http://www.w3.org/XML/1998/namespace"); </p> <p></pre></code></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload