Hi everyone,<div><br></div><div>I realize this is more of a server-side/noob question, but it directly relates to OL functionality so I thought it would be good to ask here. I&#39;m trying to dynamically grab flickr feeds and dump them into a map following the example in the OL book. I&#39;m stumped as to how to tailor the OL proxy.cgi script on my local xampp installation. I have python2.7 installed, so I&#39;ve changed the first line of the proxy.cgi to &quot;#! C:/Python27/python.exe -u&quot; following the example of someone on one of the Mapserver lists. This at least let&#39;s me redirect to the OL home page following the examples in the FAQ section (localhost/cgi-bin/proxy.cgi), meaning the script is in the right place and works. However, I&#39;m still getting denied on the cross-domain request so, it has to be an error in my code, my guess would be that it&#39;s the URL that I&#39;m providing to the javascript in the proxy host declaration. Any help would be greatly appreciated</div>
<div><br></div><div><div>var map, layer;</div><div>function init_geoflik(){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>map = new OpenLayers.Map (&quot;map&quot;, </div><div><span class="Apple-tab-span" style="white-space:pre">                </span>{controls:[ </div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>    new OpenLayers.Control.Navigation(),</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>new OpenLayers.Control.PanZoomBar(),</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>new OpenLayers.Control.LayerSwitcher(),</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>new OpenLayers.Control.Attribution(),</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>new OpenLayers.Control.ScaleLine()],</div><div>  <span class="Apple-tab-span" style="white-space:pre">                </span>sphericalMercator: true,</div><div>  <span class="Apple-tab-span" style="white-space:pre">                </span>maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),</div>
<div>  <span class="Apple-tab-span" style="white-space:pre">                </span>maxResolution: 156543.0399,</div><div>  <span class="Apple-tab-span" style="white-space:pre">                </span>numZoomLevels: 19,</div><div>  <span class="Apple-tab-span" style="white-space:pre">                </span>units: &#39;m&#39;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>});</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div>// Google Layer as Background<span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>var google_map = new OpenLayers.Layer.Google(</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&#39;Google Layer&#39;,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{}</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>map.addLayer(google_map);</div><div>//static fliker data</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>var vector_layer = new OpenLayers.Layer.Vector(&#39;Flickr Data&#39;,</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>projection: new OpenLayers.Projection(&#39;EPSG:4326&#39;),</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>protocol: new OpenLayers.Protocol.HTTP({</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>url: &#39;<a href="http://api.flickr.com/services/feeds/geo/">http://api.flickr.com/services/feeds/geo/</a>&#39;, params: {&#39;format&#39;:&#39;kml&#39;, &#39;tags&#39;:&#39;graphitti&#39;}, format: new OpenLayers.Format.KML({extractAttributes: true, extractStyles: true})}), strategies: [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.Cluster]});</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>map.addLayer(vector_layer);</div><div>//Specify modified proxyhost from OpenLayers<span class="Apple-tab-span" style="white-space:pre">        </span></div><div>OpenLayers.ProxyHost = &#39;/cgi-bin/proxy.cgi?url=&#39;;</div>
<div><br></div><div>// interaction controls</div><div>//Add a select feature control</div><div>var select_feature_control = new OpenLayers.Control.SelectFeature(</div><div>vector_layer,</div><div>{}</div><div>)</div><div>
map.addControl(select_feature_control);</div><div>select_feature_control.activate();</div><div>//Add the style map to the vector layer</div><div>vector_layer.styleMap = vector_style_map;</div><div>var vector_style_select = new OpenLayers.Style({</div>
<div>&#39;fillColor&#39;: &#39;#cdcdcd&#39;,</div><div>&#39;fillOpacity&#39;: .9,</div><div>&#39;fontColor&#39;: &#39;#232323&#39;,</div><div>&#39;strokeColor&#39;: &#39;#ffffff&#39;</div><div>})</div><div>//Create a style map object and set the &#39;default&#39; intent to the</div>
<div>var vector_style_map = new OpenLayers.StyleMap({</div><div>&#39;default&#39;: vector_style,</div><div>&#39;select&#39;: vector_style_select</div><div>});</div><div>//</div><div>vector_layer.events.register(&#39;featureselected&#39;, this, on_select_feature);</div>
<div>vector_layer.events.register(&#39;featureunselected&#39;, this, on_unselect_feature);</div><div>//center map on data loaded</div><div>  if( ! map.getCenter() ){</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  if(vector_layer){</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>  vector_layer.events.register(&#39;loadend&#39;, vector_layer, function(){map.zoomToExtent(vector_layer.getDataExtent())});</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  }</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>map.setCenter(null, null);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>};</div><div><br></div><div>//end of fn bracket</div><div>
}</div><div>function on_select_feature(event){</div><div>//Store a reference to the element</div><div>var info_div = document.getElementById(&#39;photo_info_wrapper&#39;);</div><div>info_div.innerHTML = &#39;&#39;;</div><div>
//Store the clusters</div><div>var cluster = event.feature.cluster;</div><div>//Loop through the cluster features</div><div>for(var i=0; i&lt;cluster.length; i++){</div><div>//Update the div with the info of the photos</div>
<div>info_div.innerHTML += &quot;&lt;strong&gt;&quot;</div><div>+ cluster[i].<a href="http://attributes.name">attributes.name</a></div><div>+ &quot;&lt;/strong&gt;&lt;br /&gt;&quot;</div><div>+ &quot;&lt;img src=&#39;&quot; + cluster[i].style.externalGraphic + &quot;&#39;/&gt;&quot;</div>
<div>+ cluster[i].attributes.Snippet</div><div>+ &quot;&lt;br /&gt;&lt;hr /&gt;&quot;;</div><div>}</div><div>}</div><div>function on_unselect_feature(event){</div><div>//Store a reference to the element</div><div>var info_div = document.getElementById(&#39;photo_info_wrapper&#39;);</div>
<div>//Clear out the div</div><div>info_div.innerHTML = &#39;&#39;;</div><div>}</div><div><br></div><div><br></div><br>-- <br><br><div>Dept. of Anthropology</div><div>Washington University in St. Louis</div><div>Campus Box 1114</div>
<div>St. Louis, MO, 63130</div><div>(917) 370-3489</div><div><a href="mailto:nefremov@artsci.wustl.edu" target="_blank">nefremov@wustl.edu</a><br></div><br>
</div>