You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When moving node-mapnik-sample-code from sphericalmercator to WSG84, the map has rendered as it had to adjusted the height.
postgis_settings = {
'srid' : '4326',
'table' : 'mytable' // has SRID 4326 anyway
}
…
var proj4 = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs';
// var proj4 = mercator.proj4;
var map = new mmapnik.Map(256, 256, proj4 );
var layer = new mapnik.Layer('tile', proj4 );
…
// var bbox = mercator.xyz_to_envelope(parseInt(params.x),parseInt(params.y),parseInt(params.z), false);
var bbox = tilebelt.tileToBBOX([parseInt(params.x),parseInt(params.y),parseInt(params.z)]);
…
map.aspect_fix_mode=8; // without this line, the coordinates are extended on height ...
map.extent = bbox; // ... when setting the map extent to the Bbox
I may have misused something, but setting aspect_fix_mode to 8 works fine, while leaving it to 0 changes the heigth coordinates
The text was updated successfully, but these errors were encountered:
The default in mapnik is GROW_BBOX, which may act as ADJUST_BBOX_HEIGHT or ADJUST_BBOX_WIDTH depending on the dimensions that are to be adjusted. What you refer to as 8 is RESPECT which means no adjustment is made.
When moving node-mapnik-sample-code from sphericalmercator to WSG84, the map has rendered as it had to adjusted the height.
postgis_settings = {
'srid' : '4326',
'table' : 'mytable' // has SRID 4326 anyway
}
…
var proj4 = '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs';
// var proj4 = mercator.proj4;
var map = new mmapnik.Map(256, 256, proj4 );
var layer = new mapnik.Layer('tile', proj4 );
…
// var bbox = mercator.xyz_to_envelope(parseInt(params.x),parseInt(params.y),parseInt(params.z), false);
var bbox = tilebelt.tileToBBOX([parseInt(params.x),parseInt(params.y),parseInt(params.z)]);
…
map.aspect_fix_mode=8; // without this line, the coordinates are extended on height ...
map.extent = bbox; // ... when setting the map extent to the Bbox
I may have misused something, but setting aspect_fix_mode to 8 works fine, while leaving it to 0 changes the heigth coordinates
The text was updated successfully, but these errors were encountered: