[maplab-users] GMapFactory error
Zak James
zak-ms at hoppsan.org
Wed Sep 1 17:27:23 EDT 2004
David,
This is due to an error in the new version. Franck Villoin already
encountered this and helpfully provided a patch which I'm including
below. It will be incorporated in a bug fix release but the
modification is small and you can make it in your local copy if you
don't want to wait.
zak
--
Zak James
Applications and Software Development
DM Solutions Group Inc.
http://www.dmsolutions.ca
> Hi list,
>
> I installed the new version of MapLab 2.2 on my system.
> When I open in MapEdit the old map (created by MapLab 2.1 rc3) and use
> gMapFactory the first time is good.
> When I change the option and I click the Apply button I have the error.
>
> Warning: [MapServer Error]: msLoadMap(): (//Rac//rac_fr.map) in
> E:\MapLab\htdocs\gmapfactory\build_phtml.php on line 1301
>
> Warning: Failed to open map file //Rac//rac_fr.map in
> E:\MapLab\htdocs\gmapfactory\build_phtml.php on line 1301
>
> Parse error: parse error, unexpected ')' in
> E:\MapLab\projects\gmf_apps\test_franck\globprefs.php on line 46
>
> Fatal error: Call to a member function on a non-object in
> E:\MapLab\projects\gmf_apps\test_franck\test_franck.php on line 51
>
>
> After see the code sources off build_phtml.php, if I commente the
> lines 117
> at 128
>
> /*if (substr($http_form_vars['gszMapFile'], 0, 1) == "/" ||
> preg_match('/^(\w:)/', $http_form_vars['gszMapFile']))
> {
> if (substr($http_form_vars["gszMapFile"], 0,
> strlen($gszFileBrowserRoot)) == $gszFileBrowserRoot)
> {
> $http_form_vars["gszMapFile"] =
> "/".substr($http_form_vars["gszMapFile"], strlen($gszFileBrowserRoot));
> }
> else
> {
> $gszFileBrowserRoot = '';
> }
> } */
>
> and change the lines 130 at 133
>
> if ( !drawGlobprefs( $http_form_vars["gszAppDir"]."globprefs.php",
> $http_form_vars["gszAppDir"], $http_form_vars["gszWorkingDir"].
> "settings.php",
> $gszFileBrowserRoot.$http_form_vars["gszMapFile"],
> $gszMapscriptModule,
> $oLog ) )
>
> by
> if ( !drawGlobprefs( $http_form_vars["gszAppDir"]."globprefs.php",
> $http_form_vars["gszAppDir"], $http_form_vars["gszWorkingDir"].
> "settings.php",
> /*$gszFileBrowserRoot.*/$http_form_vars["gszMapFile"],
> $gszMapscriptModule,
> $oLog ) )
On Sep 1, 2004, at 3:27 PM, David Hiltz wrote:
> Hello.
>
> I just started playing around with MapLab 2.2 and I like it so far.
>
> Environment:
> Linux Redhat 7.3 Server
> Apache 1.3.27
> Mapserver 4.2.2
> PHP 4.3.8
>
> I've run into a problem when I get click 'Apply' in GMapFactory.
>
> I fire up Mapedit
> Load my .map file.
> Click on the GMapFactory Icon and pick my project and click OK
> The GMapFactory page loads fine with my map.
> I now click 'Apply' and get this message in the main window:
>
> Parse error: parse error, unexpected ')' in
> /maplab-2.2/projects/gmf_apps/david/globpres.php on line 46
>
> Line 45 and below look like this (notice the missing values):
>
> // define the maximum extents
> define( "MAX_EXT_MINX", );
> define( "MAX_EXT_MINY", );
> define( "MAX_EXT_MAXX", );
> define( "MAX_EXT_MAXY", );
>
> When I look at the MAPFILE line above this code, it looks like this:
>
> define( "MAPFILE", "///david//mymap.map" );
>
> The path to my map file is wrong for some reason which is probably
> why it is not finding the extent values. I get this warning in the
> left
> menu window.
>
> Warning: Failed to open map file ///dhiltz//mymap.map in
> /maplab-2.2/htdocs/gmapfactory/build_phtml.php on line 1301
>
> This is the MAPFILE line when it works correctly (when I first come
> into
> GMapFactory):
>
> define( "MAPFILE", "/maplab-2.2/projects/gmf_apps////david//mymap.map"
> );
>
> Something happens when I click apply that causes it not to give the
> right
> path to my map file.
>
> Any ideas?
>
> Thanks.
>
> David Hiltz
>
>
> _______________________________________________
> Maplab-users mailing list
> Maplab-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/maplab-users
>
More information about the Maplab-users
mailing list