OpenLayers: parsed GeoJSON points always display at coords(0 , 0)


this is the first time i use OpenLayers and i don't understand what i'm doing wrong.

I try to display a simple point parsed from GeoJSON. The data seems to be parsed correctly (i checked with the console) but whatever point i give, it always displays at a position i guess to be LonLat(0,0) on my vector layer.

What am i doing wrong ?

var map, baseLayer, placesLayer, geojsonParser ;
// data below have been simplified and reformated to enhance readability
var geojsonData = 


map = new OpenLayers.Map('map');
  baseLayer = new OpenLayers.Layer.OSM();
  placesLayer = new OpenLayers.Layer.Vector();

  geojsonParser = new OpenLayers.Format.GeoJSON();

    new OpenLayers.LonLat(-4, 5.3).transform(
      new OpenLayers.Projection("EPSG:4326"),
    ), 5

}); // document ready

Best Solution

This is the right solution:

var geojson_format = new OpenLayers.Format.GeoJSON({
                'internalProjection': new OpenLayers.Projection("EPSG:900913"),
                'externalProjection': new OpenLayers.Projection("EPSG:4326")


Related Question