<div>Hello,</div><div><br></div><div>I succeded to get it working in firebug, I was using Firefox Beta 4 and Firebug is having some issues with it.</div><div><br></div><div>Check this: <a href="http://img163.imageshack.us/img163/5491/screenshot20100928at100.png">http://img163.imageshack.us/img163/5491/screenshot20100928at100.png</a></div>
<div><br></div><div>The code related to that screenshot is there: <a href="http://gist.github.com/600596">http://gist.github.com/600596</a> or here:</div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; white-space: pre-wrap; "><br>
</span></div><div><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; white-space: pre-wrap; ">        MarkersStore = new GeoExt.data.FeatureStore({</span></div><div><span class="Apple-style-span" style="font-family: Times; font-size: medium; "><pre style="word-wrap: break-word; white-space: pre-wrap; ">
<font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="font-size: small;">                layer: MarkersLayer,
                proxy: new GeoExt.data.ProtocolProxy({
                        protocol: new OpenLayers.Protocol.HTTP({
                                url: marker_api_url,
                                params:{&#39;method&#39;:&#39;\&quot;markers.get\&quot;&#39;},
                                format: new OpenLayers.Format.GeoJSON({
                                        read: function() {
                                                console.log(&quot;var This: &quot; + this);
                                                console.log(&quot;var arguments: &quot; + arguments);
                                                 var obj = OpenLayers.Format.JSON.prototype.read.apply(this, arguments);
                                                 console.log(&quot;var obj: &quot; + obj);
                                                return OpenLayers.Format.GeoJSON.prototype.read.apply(this, obj[&quot;#data&quot;]);
                                },
                                        &#39;internalProjection&#39;: proj900913,
                                        &#39;externalProjection&#39;: proj4326
                                }),
                                readWithPOST: true
                        })
                }),
                autoLoad: true,
        });</span></font></pre></span></div>

<div>The var obj is always NULL... can you help me please ?</div><div><br></div><div>Thanks...</div><div><br></div><div><br></div><div>-Pol D.-</div><a href="http://www.google.com/profiles/110003197662276240659" target="_blank">http://www.google.com/profiles/110003197662276240659</a><br>

<br><br><div class="gmail_quote">On Fri, Sep 17, 2010 at 10:15, Pol <span dir="ltr">&lt;<a href="mailto:d.paolino@gmail.com">d.paolino@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>It seems that screenshots are not allowed, so I made a link to imageshack here:</div><div><br></div><div>First: <a href="http://img713.imageshack.us/i/screenshot20100917at935.png/" target="_blank">http://img713.imageshack.us/i/screenshot20100917at935.png/</a></div>

<div>Second: <a href="http://img96.imageshack.us/i/screenshot20100917at936.png/" target="_blank">http://img96.imageshack.us/i/screenshot20100917at936.png/</a></div><div class="im"><div> </div><div><br></div>-Pol D.-<br><a href="http://www.google.com/profiles/110003197662276240659" target="_blank">http://www.google.com/profiles/110003197662276240659</a><br>


<br><br></div><div><div></div><div class="h5"><div class="gmail_quote">On Fri, Sep 17, 2010 at 09:40, Pol <span dir="ltr">&lt;<a href="mailto:d.paolino@gmail.com" target="_blank">d.paolino@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Eric, all,<div><br></div><div>I tried your advice and it doesn&#39;t work here.</div><div><br></div><div>I join you 2 screenshots where you can see what I&#39;m doing.</div><div><br></div><div>I&#39;m really lost into this, I&#39;ve tried with different versions of firefox, always the same result...</div>


<div><br></div><div>Thanks for helping!</div><div><br></div><div><div>-Pol D.-<br><a href="http://www.google.com/profiles/110003197662276240659" target="_blank">http://www.google.com/profiles/110003197662276240659</a><br>


<br><br></div><div><div></div><div><div class="gmail_quote">On Wed, Sep 15, 2010 at 08:57, Eric Lemoine <span dir="ltr">&lt;<a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Wed, Sep 15, 2010 at 8:21 AM, Pol &lt;<a href="mailto:d.paolino@gmail.com" target="_blank">d.paolino@gmail.com</a>&gt; wrote:<br>
&gt; Yes I tried also to do that, but the thing that worry me the most is that<br>
&gt; console.log() do not display anything...<br>
<br>
</div>This is weird.<br>
<br>
Overriding read works for me. In the FireBug console:<br>
<br>
&gt;&gt;&gt; var f = new OpenLayers.Format.GeoJSON({read: function(str) { console.log(str); }});<br>
&gt;&gt;&gt; f.read(&quot;foo&quot;);<br>
foo<br>
<br>
Likewise the following patch to the feature-grid.html example works for me:<br>
<br>
diff --git examples/feature-grid.js examples/feature-grid.js<br>
index 04cf945..d9419e6 100644<br>
--- examples/feature-grid.js<br>
+++ examples/feature-grid.js<br>
@@ -48,7 +48,12 @@ Ext.onReady(function() {<br>
<div>         proxy: new GeoExt.data.ProtocolProxy({<br>
             protocol: new OpenLayers.Protocol.HTTP({<br>
</div>                 url: &quot;data/summits.json&quot;,<br>
-                format: new OpenLayers.Format.GeoJSON()<br>
+                format: new OpenLayers.Format.GeoJSON({<br>
+                    read: function() {<br>
+                        console.log(&quot;in read&quot;);<br>
+                        return<br>
OpenLayers.Format.GeoJSON.prototype.read.apply(this, arguments);<br>
+                    }<br>
+                })<br>
             })<br>
         }),<br>
         autoLoad: true<br>
<div><br>
<br>
&gt; I&#39;ve modified my code like this:<br>
&gt; MarkersStore = new GeoExt.data.FeatureStore({<br>
&gt; layer: MarkersLayer,<br>
&gt; proxy: new GeoExt.data.ProtocolProxy({<br>
&gt; protocol: new OpenLayers.Protocol.HTTP({<br>
&gt; url: marker_api_url,<br>
&gt; format: new OpenLayers.Format.GeoJSON({<br>
&gt; read: function() {<br>
&gt; console.log(&quot;testing...&quot;);<br>
&gt;                         var obj = OpenLayers.Format.JSON.read.apply(this,<br>
&gt; arguments);<br>
&gt;     return OpenLayers.Format.GeoJSON.read.apply(this, obj[&#39;#data&#39;]);<br>
&gt;         },<br>
&gt; &#39;internalProjection&#39;: proj900913,<br>
&gt; &#39;externalProjection&#39;: proj4326<br>
&gt; }),<br>
&gt; readWithPOST: true<br>
&gt; })<br>
&gt; }),<br>
&gt; autoLoad: true,<br>
&gt; });<br>
&gt; Any idea?<br>
<br>
<br>
</div>Patching the feature-grid.html example has made me realize that<br>
there&#39;s something wrong in the above code. The read method is<br>
obviously set in the prototype, so OpenLayers.Format.JSON.read should<br>
be OpenLayers.Format.JSON.prototype.read, and likewise for<br>
Format.GeoJSON.<br>
<font color="#888888"><br>
<br>
--<br>
</font><div><div></div><div>Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>