Hi,

Add projection to the map options. 

By default it is EPSG:4326 and somehow it is possible in one map to mix
EPSG:4326 and EPSG:900913.

map = new OpenLayers.Map('mapa',{
            projection:new OpenLayers.Projection("EPSG:900913"),
            controls: [
            new OpenLayers.Control.Navigation(),
            //new OpenLayers.Control.ScaleLine(),
                        new OpenLayers.Control.KeyboardDefaults(),
                        new OpenLayers.Control.PanZoom()],
});
 

Arnd

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von vrbikdan
Gesendet: Dienstag, 6. Dezember 2011 22:22
An: [email protected]
Betreff: [OpenLayers-Users] points bouncing on their coordinates

Hi all,
I'm trying to make map with some points so I defined this points in code
with their coordinates, but problem is, when I try to pan with the map. This
points doesn't stay in their locations and moving some around. I can't
figure it out, where is problem. Aplication is here: 
http://vrbikdan.xf.cz/blom/mapa.html# http://vrbikdan.xf.cz/blom/mapa.html#
and part of the code here:

var featurecollection = {
              "type": "FeatureCollection", 
              "features":[
              
{"type":"Feature","geometry":{"type":"Point","coordinates":[19.21,43.23]},"i
d":"1",
                                "loc_name":"Desna",
                                "x_coor":"16.1",
                                "y_coor":"42.8",
                                "z_coor":"300",
                                "municip":"x",
                                "watershed":"x",
                                }]};
                       
           var geojson_format = new OpenLayers.Format.GeoJSON();
           var HydroelLayer = new OpenLayers.Layer.Vector(); 
           map.addLayer(HydroelLayer);
           HydroelLayer.addFeatures(geojson_format.read(featurecollection));

Thanks a lot
Dan

--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/points-bouncing-on-their-coordinates-
tp7068441p7068441.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to