<div dir="ltr">Hi all,<div><br></div><div>I still have problems with map.</div><div><br></div><div>The feature of the http layer appears in wrong position, or rather, is the base layer position wrong according the coordinates visible on the map.</div>
<div><br></div><div>This is a test file:</div><div><div><br></div><div><!DOCTYPE html></div><div><html></div><div>    <head></div><div>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></div>
<div>    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"></div><div>    <meta name="apple-mobile-web-app-capable" content="yes"></div>
<div>        <title>OpenLayers Vector Behavior Example</title></div><div>        <link rel="stylesheet" href="style.css" type="text/css"></div><div>        <script src="/js/ol/OpenLayers.js"></script></div>
<div>        <script type="text/javascript"></div><div>            var map;</div><div><br></div><div>            function init() {</div><div>                map = new OpenLayers.Map('map',{</div><div>
                  'projection':new OpenLayers.Projection("EPSG:32633"),</div><div>                  'displayProjection':new OpenLayers.Projection("EPSG:32633")</div><div>                });</div>
<div><br></div><div>                map.addControl(</div><div>                  new OpenLayers.Control.MousePosition({</div><div>                    prefix: 'coordinates: ',</div><div>                    separator: ' , ',</div>
<div>                    numDigits: 2</div><div>                  })</div><div>                );</div><div><br></div><div>                var osmLayer = new OpenLayers.Layer.OSM("OSM", "<a href="http://tile.openstreetmap.org/${z}/${x}/${y}.png">http://tile.openstreetmap.org/${z}/${x}/${y}.png</a>");</div>
<div><br></div><div>                var httpLayer = new OpenLayers.Layer.Vector("HTTP", {</div><div>                    strategies: [</div><div>                      new OpenLayers.Strategy.BBOX(),</div><div>                      new OpenLayers.Strategy.Cluster({threshold:2})</div>
<div>                    ],</div><div>                    protocol: new OpenLayers.Protocol.HTTP({</div><div>                      url:  "/lwa/aib/feature/firealert",</div><div>                      format: new OpenLayers.Format.GeoJSON()</div>
<div>                    }),</div><div>                    'projection':new OpenLayers.Projection("EPSG:32633")</div><div>                });</div><div><br></div><div>                var fromProjection = new OpenLayers.Projection("EPSG:4326");</div>
<div>                var toProjection   = new OpenLayers.Projection("EPSG:900913");</div><div><br></div><div>                map.addControl(new OpenLayers.Control.PanZoomBar());</div><div>                map.addLayer(osmLayer);</div>
<div>                map.setBaseLayer(osmLayer);</div><div>                </div><div>                map.setOptions({projection:map.getProjectionObject()});</div><div>                map.setCenter(new OpenLayers.LonLat(14.84, 40.8).transform(fromProjection, toProjection), 8);</div>
<div>                map.addLayer(httpLayer);</div><div>            }</div><div>        </script></div><div>    </head></div><div>    <body onload="init()"></div><div>      <h1 id="title">Vector Behavior Example</h1></div>
<div>      <div id="tags"></div><div>        wfs, vector</div><div>      </div></div><div>      <p id="shortdesc"></div><div>        Uses a BBOX strategy, WFS protocol, and JSON format.</div>
<div>      </p></div><div>      <div id="map" class="smallmap"></div></div><div>    </body></div><div></html></div><div><br></div></div><div><br></div><div><br></div><div>
/lwa/aib/feature/firealert is this geoJSON<br></div><div><br></div><div><div>{</div><div>  "layerId": "LAYER_ID",</div><div>  "id": "idFire",</div><div>  "type": "FeatureCollection",</div>
<div>  "features": [</div><div>    {</div><div>      "type": "Feature",</div><div>      "properties": {</div><div>        "id": "5260ff4ef169d6bc06000881",</div>
<div>        "graphicXOffset": -12,</div><div>        "graphicWidth": 24,</div><div>        "graphicYOffset": -12,</div><div>        "clickMsg": "FAFeatureClick",</div><div>
        "externalGraphic": "core/giallo.png",</div><div>        "hoverTooltip": "CE1310000001",</div><div>        "graphicHeight": 24</div><div>      },</div><div>      "geometry": {</div>
<div>        "type": "Point",</div><div>        "coordinates": [</div><div>          432382.780106,</div><div>          4581712.6739</div><div>        ]</div><div>      }</div><div>    },</div>
<div>    {</div><div>      "type": "Feature",</div><div>      "properties": {</div><div>        "id": "5260ff4ef169d6bc06000882",</div><div>        "graphicXOffset": -12,</div>
<div>        "graphicWidth": 24,</div><div>        "graphicYOffset": -12,</div><div>        "clickMsg": "FAFeatureClick",</div><div>        "externalGraphic": "core/rosso.png",</div>
<div>        "hoverTooltip": "CE1310000002",</div><div>        "graphicHeight": 24</div><div>      },</div><div>      "geometry": {</div><div>        "type": "Point",</div>
<div>        "coordinates": [</div><div>          433482.780106,</div><div>          4582712.6739</div><div>        ]</div><div>      }</div><div>    },</div><div>    {</div><div>      "type": "Feature",</div>
<div>      "properties": {</div><div>        "id": "52610c1ef169d6bc0600088b",</div><div>        "graphicXOffset": -12,</div><div>        "graphicWidth": 24,</div><div>        "graphicYOffset": -12,</div>
<div>        "clickMsg": "FAFeatureClick",</div><div>        "externalGraphic": "core/verde.png",</div><div>        "hoverTooltip": "CE1310000003",</div><div>        "graphicHeight": 24</div>
<div>      },</div><div>      "geometry": {</div><div>        "type": "Point",</div><div>        "coordinates": [</div><div>          445557,</div><div>          4532769</div><div>        ]</div>
<div>      }</div><div>    }</div><div>  ]</div><div>}</div></div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/14 Hugo <span dir="ltr"><<a href="mailto:hfpmartins@gmail.com" target="_blank">hfpmartins@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Giuseppe,<div><br></div><div>If you wish to show those coordinates you can configure the MousePosition control to use that projection (displayProjection config option) while still having the map projection set as EPSG:3857. </div>

<div><br></div><div>Cheers,</div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Tue, Jan 14, 2014 at 10:53 AM, Giuseppe Falcone <span dir="ltr"><<a href="mailto:falcone.giuseppe@gmail.com" target="_blank">falcone.giuseppe@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Hugo,<div><br></div><div>thanks for the response. I need to use EPSG:32633 because this coordinate are shown. </div>

</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/14 Hugo <span dir="ltr"><<a href="mailto:hfpmartins@gmail.com" target="_blank">hfpmartins@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Giuseppe,<div><br></div><div>If you wish to use OSM and other available layers using sperical mercator (google, bing, ...) you will need to define your map projection as EPSG:3857 and reproject all your remaining layers.</div>



<div><br></div><div>Hope this helps,</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Tue, Jan 14, 2014 at 10:33 AM, Giuseppe Falcone <span dir="ltr"><<a href="mailto:falcone.giuseppe@gmail.com" target="_blank">falcone.giuseppe@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi all,<div><br></div><div>I have a map with base layer with projection EPSG:32633. Others layer have same projection and also OpenLayers.Map object.</div>



<div><br></div><div>When I add OSM or Google base layer, that have different projection, the map center and zoom are completely wrong (I see all planisphere....).</div>
<div><br></div><div>Anyone has any idea?</div><div><br></div><div>Thanks a lot.</div><span><font color="#888888"><div><br></div><div>Giuseppe</div></font></span></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><span><font color="#888888"><br></font></span></blockquote></div>
<span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Hugo Martins<br>

</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Hugo Martins<br>
</font></span></div>
</blockquote></div><br></div>