I have been trying to load a GeoJSON without success. I have a map with a background layer from OSM. I have some data in 4326 I want to overlay on that map. I do not want to transform coordinates one by one on the server-side and I'd rather have OpenLayers transform them on the fly ... if possible at all.
I have tried using the "projection" attribute under the vector Layer, vector Source, main background layer, ... everywhere I have thought of ... to no avail: the sample point keeps showing near 0,0.
I set up a fiddle with my test code, any idea? Is it simply not possible?
http://jsfiddle.net/zzahmbff/2/
The data here is just a sample. Once I get it to work I'll load the data with AJaX (Asyncronous Javascript XML).
أكثر...
I have tried using the "projection" attribute under the vector Layer, vector Source, main background layer, ... everywhere I have thought of ... to no avail: the sample point keeps showing near 0,0.
I set up a fiddle with my test code, any idea? Is it simply not possible?
http://jsfiddle.net/zzahmbff/2/
The data here is just a sample. Once I get it to work I'll load the data with AJaX (Asyncronous Javascript XML).
أكثر...