[OpenLayers-Users] getPixelFromCoordinate method in OL3?

pascal pascal2833 at gmail.com
Tue Jun 2 05:59:05 PDT 2015


Hi, 

I'm trying to retrieve pixel coordinates from long/lat coordinate to draw in
a canvas element using this way:
var geometryFirstClub = clubFeatures[0].getGeometry(); // clubFeatures is an
array of circles
var coordinateFirstClub = geometryFirstClub.getCenter(); 
 console.log(coordinateFirstClub); // Return Array [ 7, 43.33 ]
 var pixel = getPixelFromCoordinate(coordinateFirstClub);
console.log(pixel); // Return null

So, I don't understand why I have "null" in console.log response.
What's wrong?

Thanks a lot, 

Pascal.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/getPixelFromCoordinate-method-in-OL3-tp5208665.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list