restore default behavior of PointSymbolizer when used without an image, by defaulting to 4x4 black pixel - TODO - expose colors, shapes, and size for this in the future
This commit is contained in:
parent
b540dab73b
commit
b8511eca65
2 changed files with 24 additions and 2 deletions
|
@ -433,7 +433,18 @@ void agg_renderer<T>::process(point_symbolizer const& sym,
|
|||
double z=0;
|
||||
|
||||
std::string filename = path_processor_type::evaluate( *sym.get_filename(), feature);
|
||||
boost::optional<mapnik::image_ptr> data = mapnik::image_cache::instance()->find(filename,true);
|
||||
boost::optional<mapnik::image_ptr> data;
|
||||
|
||||
if ( filename.empty() )
|
||||
{
|
||||
// default OGC 4x4 black pixel
|
||||
data = boost::optional<mapnik::image_ptr>(new image_data_32(4,4));
|
||||
(*data)->set(0xff000000);
|
||||
}
|
||||
else
|
||||
{
|
||||
data = mapnik::image_cache::instance()->find(filename,true);
|
||||
}
|
||||
|
||||
if ( data )
|
||||
{
|
||||
|
|
|
@ -731,7 +731,18 @@ void cairo_renderer_base::process(point_symbolizer const& sym,
|
|||
proj_transform const& prj_trans)
|
||||
{
|
||||
std::string filename = path_processor_type::evaluate( *sym.get_filename(), feature);
|
||||
boost::optional<mapnik::image_ptr> data = mapnik::image_cache::instance()->find(filename,true);
|
||||
boost::optional<mapnik::image_ptr> data;
|
||||
|
||||
if ( filename.empty() )
|
||||
{
|
||||
// default OGC 4x4 black pixel
|
||||
data = boost::optional<mapnik::image_ptr>(new image_data_32(4,4));
|
||||
(*data)->set(0xff000000);
|
||||
}
|
||||
else
|
||||
{
|
||||
data = mapnik::image_cache::instance()->find(filename,true);
|
||||
}
|
||||
|
||||
if ( data )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue