try replace line 241 in common.php if ($mapProjStr != $layerProjStr) { with if ($mapProjStr && $layerProjStr && $mapProjStr != $layerProjStr) {
and see if the error disappears. I always use projection definitions for layers so I will not get this error. armin On 14/01/2013 17:07, Chris forum wrote: > Hi all, > > pmapper 4.3 / plainlayout4 > Xubuntu (OSGEO live 6) > Mapserver 6.0.3 > php 5.3.10 > > According to the MapServer doc ( > http://mapserver.org/mapfile/projection.html#projection): > "*If all of your data in the mapfile is in the same projection, you DO NOT > have to specify any projection objects. MapServer will assume that all of > the data is in the same projection*." > > That is my case, here under the projection declared at the beginning of the > mapfile: > > MAP > ... > PROJECTION > #"init=epsg:21781" > "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 > +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.4,15.1,405.3,0,0,0,0 > +units=m +no_defs" > END > > As stated by the note above, I don't have to specify each layer projection > in order to have the map displayed correctly. > > But if I want to have the legend working (toc/legend swap with plainlayout4 > example<javascript:openNew('p42',%20'960#700#medium',%20'it',%20'plainlayout4',%20'')>), > I have to add this projection to each layer individually. If I don't, I get > the following php error: > > PHP Warning: projectionObj::__construct(): [MapServer Error]: > msProcessProjection(): projection not named > in /data/dataweb/web/pmapper/pmapper430/incphp/common.php on line 247 > [14-Jan-2013 15:45:58 UTC] PHP Fatal error: Uncaught exception > 'MapScriptException' with message 'Unable to construct projectionObj.' in > /data/dataweb/web/pmapper/pmapper430/incphp/common.php:247 > Stack trace: > #0 /data/dataweb/web/pmapper/pmapper430/incphp/common.php(247): > projectionObj->__construct('') > #1 /data/dataweb/web/pmapper/pmapper430/incphp/layerview.php(201): > PMCommon::checkScale(Object(mapObj), Object(layerObj), 4623.0496440596, > Array) > #2 /data/dataweb/web/pmapper/pmapper430/incphp/layerview.php(141): > LayerView->getGroup(Object(GROUP)) > #3 /data/dataweb/web/pmapper/pmapper430/incphp/layerview.php(107): > LayerView->getGroupList() > #4 /data/dataweb/web/pmapper/pmapper430/incphp/legend.php(53): > LayerView->getCategoryList() > #5 /data/dataweb/web/pmapper/pmapper430/incphp/xajax/x_legend.php(43): > Legend->writeGroups(false, Array) > #6 {main} > thrown in /data/dataweb/web/pmapper/pmapper430/incphp/common.php on line > 247 > > Is that a normal behaviour of pmapper? > > Cheers, > Chris > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122412 > _______________________________________________ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users > ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users