[Chameleon] msProcessProjection(): projection not named, KeyMapDHTML widget

Paul Spencer pspencer at dmsolutions.ca
Tue Feb 22 08:39:02 EST 2005


Bart,

seems like a bug in KeyMapDHTML ... I don't think projection support was 
ever fully completed or tested.  I think that you can fix this by doing 
one of the following:

* change the following line in KeyMapDHTML

$this->mszSRS = isset($this->maParams['SRS']) ? $this->maParams['SRS'] : 
$this->mszSRS;


to

$this->mszSRS = 'init=epsg:';
$this->mszSRS .= isset($this->maParams['SRS']) ? $this->maParams['SRS'] 
: $this->mszSRS;

* find each call to reprojectPoint in KeyMapDHTML and modify it to 
prepend "init=epsg:" to $this->mszSRS, for example:

reprojectPoint( $nGeoMinx, $aGeoMiny, "init=epsg:".$this->mszSRS, 
$this->moMapObject->oMap->getProjection() );

Please test and let me know if that fixes things

Paul

bartvde at xs4all.nl wrote:
> Hi list,
> 
> I am using Chameleon 2.0 in an MS4W environment.
> 
> I am experiencing the following problem when using the keymapDHTML widget:
> 
> msProcessProjection(): projection not named in
> C:\ms4w\apps\chameleon\htdocs\widgets\geomath.php
> 
> I have debugged this down to the arguments being:
> 
>     $oPoint->project( ms_newProjectionObj( $szFrom ),
>                       ms_newProjectionObj( $szTo )
>                        );
> 
> $szFrom = +init=epsg:4326
> $szTo = 28992
> 
> The last one fails with the above error (if I put +init=epsg: in front of
> it everything works fine).
> 
> Do I need to use proj init strings now in the SRS attribute of the
> KeyMapDHTML? Or is something wrong with the code?
> 
> My definition of KeyMapDHTML:
> 
> <cwc2 type="KeyMapDHTML" image="/chameleon/geoservices/nederland.png"
> SRS="28992" WIDTH="135" HEIGHT="157" MINX="20000" MAXX="285000"
> MINY="305000" MAXY="620000"/>
> 
> Is this a known issue?
> 
> Best regards,
> Bart
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the Chameleon mailing list