Opened 13 years ago
Last modified 6 years ago
#1757 reopened defect
Quick Plot cannot generate map picture in some non-English locale
Reported by: | wuma | Owned by: | Mars Wu |
---|---|---|---|
Priority: | high | Milestone: | 4.0 |
Component: | General | Version: | 2.2.0 |
Severity: | major | Keywords: | |
Cc: | thomaslorenzon | External ID: | 1406806 |
Description
In some non-English locale, for instance French or German where the decimal point and digit separator are not the same as English, if you run Quick Plot to generate a map picture, you will always get a message on the preview dialog saying: “The application resources required to generate the plot exceed the settings defined by the administrator”.
The reason is that Quick Plot encodes (as string) the parameters like centerX, centerY, PaperSize etc. always in English format (. as decimal point and , as digit separator) but when parsing the values with aspx, php or jsp, current culture will be used then the value will be invalid.
To fix it, the passed string values should be parsed always in English format.
Attachments (2)
Change History (16)
by , 13 years ago
Attachment: | ticket1757_quickplot_ajax.patch added |
---|
by , 13 years ago
Attachment: | ticket1757_quickplot_fusion.patch added |
---|
comment:1 by , 13 years ago
follow-up: 4 comment:2 by , 13 years ago
2416 to fusion trunk. http://trac.osgeo.org/fusion/log/trunk/widgets?rev=2416
comment:3 by , 13 years ago
r6012 to adsk sandbox 2.3r
2417 to fusion adsk sandbox 2.3r: http://trac.osgeo.org/fusion/changeset/2417
comment:4 by , 13 years ago
Replying to wuma:
2416 to fusion trunk. http://trac.osgeo.org/fusion/log/trunk/widgets?rev=2416
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 7 comment:6 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Summary: | Quick Ploat cannot generate map picture in some non-English locale → Quick Plot cannot generate map picture in some non-English locale |
I tried to implement on MGE2012 (italian version) your patch but it doesn't work (a black image is generated). Then I had a look at GeneratePicture.php and found a possible solution. Modify row 106 as follow:
$mapAgent .="/mapserver2012/mapagent/mapagent.fcgi?VERSION=1.0.0&OPERATION=GETMAPIMAGE" .
Now for me it works but I known that it doesn't work with MGOS. Someone can change it and do it better?
Thanks, Thomas
comment:7 by , 13 years ago
Replying to thomaslorenzon:
I tried to implement on MGE2012 (italian version) your patch but it doesn't work (a black image is generated). Then I had a look at GeneratePicture.php and found a possible solution. Modify row 106 as follow:
$mapAgent .="/mapserver2012/mapagent/mapagent.fcgi?VERSION=1.0.0&OPERATION=GETMAPIMAGE" .
Now for me it works but I known that it doesn't work with MGOS. Someone can change it and do it better?
Thanks, Thomas
Can you tell me your configuration? Windows or Linux, IIS or Apache? The $mapAgent cannot be changed as you mentioned, because it will not work if your Web Extension is behind a Http proxy server. And you cannot use http://locahost either, because it doesn't work with Apache + Php. http://127.0.0.1 should always work with IPv4. And with RFC 118, I plan to change the way of generating the print picture from calling Http API to calling Web Tier API. And a new MgMap::SetDisplayDpi will be exposed to support the change.
follow-up: 9 comment:8 by , 13 years ago
Cc: | added |
---|
My configuration is Windows Server 2003 (Italian version) + IIS + MGE 2012 (Italian Version). I tried also with http://127.0.0.1 and it works. I think that row 105 of GeneratePicture.php must add "/mapserver2012/" (for MGE 2012) or "/mapguide/" (for MG OS). But it doesn't work.
comment:9 by , 13 years ago
Replying to thomaslorenzon:
My configuration is Windows Server 2003 (Italian version) + IIS + MGE 2012 (Italian Version). I tried also with http://127.0.0.1 and it works. I think that row 105 of GeneratePicture.php must add "/mapserver2012/" (for MGE 2012) or "/mapguide/" (for MG OS). But it doesn't work.
Below code is used to get the virtual directory name from the URL:
$mapAgent .= substr($_SERVER["REQUEST_URI"], 0, strpos($_SERVER["REQUEST_URI"], "/", 1));
So it's not necessary to specify either mapserver2012 or mapguide. Could you use firebug to find out what the generated image src is? Is it a correct url?
follow-up: 11 comment:10 by , 13 years ago
Sorry in advance for my english and for my firebug knownledge.. How can I use firebug for debugging a php page? GeneratePicture.php doesn't show anything, just send an image
This is the image src of the preview image: <img src="GeneratePicture.php?session_id=29453cac-b9b7-11e0-8000-000c297c9304_en_7F0000010B060B050B04&map_name=Sheboygan4e3265e474392&print_dpi=300&paper_size=297,210&box=-87.72847257218196,43.74324250536751,-87.72180258119737,43.74324250536751,-87.72180258119737,43.747958660609136,-87.72847257218196,43.747958660609136&normalized_box=-87.72847257218196,43.74324250536751,-87.72180258119737,43.74324250536751,-87.72180258119737,43.747958660609136,-87.72847257218196,43.747958660609136&scale_denominator=2500&rotation=0" id="PrintPicture" style="opacity: 1; visibility: visible;">
I try this:
- comment out in GeneratePicture.php all the "generate image" code
- use echo to show $mapAgent value
- load just GeneratePicture.php passing the above parameters
As you can see there is no "mapuide" or "mapserver2012" path.
comment:11 by , 13 years ago
Replying to thomaslorenzon:
Sorry in advance for my english and for my firebug knownledge.. How can I use firebug for debugging a php page? GeneratePicture.php doesn't show anything, just send an image
This is the image src of the preview image: <img src="GeneratePicture.php?session_id=29453cac-b9b7-11e0-8000-000c297c9304_en_7F0000010B060B050B04&map_name=Sheboygan4e3265e474392&print_dpi=300&paper_size=297,210&box=-87.72847257218196,43.74324250536751,-87.72180258119737,43.74324250536751,-87.72180258119737,43.747958660609136,-87.72847257218196,43.747958660609136&normalized_box=-87.72847257218196,43.74324250536751,-87.72180258119737,43.74324250536751,-87.72180258119737,43.747958660609136,-87.72847257218196,43.747958660609136&scale_denominator=2500&rotation=0" id="PrintPicture" style="opacity: 1; visibility: visible;">
I try this:
- comment out in GeneratePicture.php all the "generate image" code
- use echo to show $mapAgent value
- load just GeneratePicture.php passing the above parameters
As you can see there is no "mapuide" or "mapserver2012" path.
Could you let me know your URL for installed MapGuide? Is there either "mapserver2012" or "mapguide"? It seems $_SERVER["REQUEST_URI"]
doesn't get your virtual directory correctly which is strange...
comment:12 by , 12 years ago
Milestone: | → 2.5 |
---|
r6010 to trunk