[OpenLayers-Users] Importing JSON to WKT

Greg Allensworth gregor at greeninfo.org
Tue Jul 10 08:38:55 PDT 2012


On 7/9/2012 7:44 PM, Joel Leininger wrote:
>  updateJson = new OpenLayers.Format.JSON();
>  updateOutput = updateJson.read(updateRequest.responseText);
>  console.log(updateOutput);
>  console.log(updateOutput[0]);
>  updateStatus = updateOutput.status;
>  if (updateStatus == 'added') {
>  new polygone = parcer.read(updateOutput[0]);

Try adding console.log lines as I indicated above, and reading Firebug's 
output. The value of "updateOutput" is the parsed JSON object/array -- 
are you positive that it's an array of plain strings in WKT format, and 
not an array of objects that have a property storing the WKT, nor a 
single plain string?

-- 
Greg Allensworth, Web GIS Developer
BS  A+  Network+  Security+  Linux+  Server+
GreenInfo Network - Information and Mapping in the Public Interest
564 Market Street, Suite 510  San Francisco CA 94104
PH: 415-979-0343 x302  FX: 415-979-0371    email: gregor at greeninfo.org
Web: www.GreenInfo.org     www.MapsPortal.org

Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org




More information about the Users mailing list