It may be a projection problem but I’ll need confirmation.
I am establishing the projection of my feature layers based on the following:
var projection = new Proj4Projection
{
// Set both internal and external projection same for now..
InternalProjectionParametersString = Proj4Projection.GetWgs84ParametersString(),
ExternalProjectionParametersString = Proj4Projection.GetEpsgParametersString("3857")
};
The external string is based on the projection used by the OsmWorldMapStreetLayer.
Based on the above, the current projection as these properties:
ExternalProjectionParametersString = “+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs”
InternalProjectionParametersString = “+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs”
With the above strings, this line of code:
var bbox = projection.ConvertToExternalProjection(new RectangleShape(-180, 90, 180, -90));
Results to a bbox of
bbox = {-3.14159265341526,1.57079632662036,3.14159265341526,-1.57079632662036}
Which does not appear correct.