Firebug says polygone remains undefined, as if the line of code were ignored. No error message is thrown. In experimenting yesterday, I cut and pasted the Multipolygon string into the parcer.read line and it worked. Then I created a variable called wktTest and assigned the Multipolygon string to it, then ran<div>
<br></div><div>var polygone = parcer.read(wktTest); </div><div><br></div><div>and it didn't work: polygone remained unassigned. Now that last test would seem to indicate that Json is not part of the issue here, but something having to do with that read property. No variable would work; all literal strings, however, moved the geometry object to polygone.</div>
<div><br></div><div>The coordinates are correct, by the way. All the translations happen at the postgis level, and when I pass a Multipolygon literal string it plots in the correct place on the map. On that score we're good.</div>
<div><br></div><div>I'm just stumped on that read statement quirkiness.</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 2:43 PM, Greg Allensworth <span dir="ltr"><<a href="mailto:gregor@greeninfo.org" target="_blank">gregor@greeninfo.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 7/10/2012 11:21 AM, Joel Leininger wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay, here is that output:<br>
<br>
Object { status="added", numResults=1, 0=[1]}<br>
["MULTIPOLYGON(((-8528843...<u></u>591 4765443.37168208)))"]<br>
<br>
That looks right to me. Not sure of the nomenclature "0=[1]" but [1]<br>
could reflect the wkt object. The second line is what I'm trying to feed<br>
into the read statement, and it looks correct -- except the brackets.<br>
Does firebug add those or would they be in the json?<br>
</blockquote>
<br></div>
The brackets indicate that it is an array. Which is good, as you were expecting an array with 1 element, and for that one element to be a WKT string.<br>
<br>
So, when it gets to this line, what does it do? What is the value of polygone afterward? You mention that it doesn't process, but not what it really DID.<div class="im"><br>
   new polygone = parcer.read(updateOutput[0]);<br>
<br></div>
Also, I notice that the coords in the WKT are not Lon/Lat coords; perhaps Web Mercator? If you're expecting the coords to be in Web Mercator, that looks right; if you're expecting latlon, you may want to double-check.<div class="HOEnZb">
<div class="h5"><br>
<br>
-- <br>
Greg Allensworth, Web GIS Developer<br>
BS  A+  Network+  Security+  Linux+  Server+<br>
GreenInfo Network - Information and Mapping in the Public Interest<br>
564 Market Street, Suite 510  San Francisco CA 94104<br>
PH: <a href="tel:415-979-0343%20x302" value="+14159790343" target="_blank">415-979-0343 x302</a>  FX: <a href="tel:415-979-0371" value="+14159790371" target="_blank">415-979-0371</a>    email: <a href="mailto:gregor@greeninfo.org" target="_blank">gregor@greeninfo.org</a><br>

Web: <a href="http://www.GreenInfo.org" target="_blank">www.GreenInfo.org</a>     <a href="http://www.MapsPortal.org" target="_blank">www.MapsPortal.org</a><br>
<br>
Subscribe to MapLines, our e-newsletter, at <a href="http://www.GreenInfo.org" target="_blank">www.GreenInfo.org</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>