nakijun / morisoliver

Automatically exported from code.google.com/p/morisoliver
0 stars 0 forks source link

Enable printing for tilesets #197

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Current message is "There are no active datalayers to print." for either 
"MassGIS_Basemap" or other tilesets

Original issue reported on code.google.com by Aleda.Fr...@state.ma.us on 3 Jan 2013 at 9:06

GoogleCodeExporter commented 9 years ago
Please try r423.

Original comment by cpl...@gmail.com on 7 Jan 2013 at 4:47

GoogleCodeExporter commented 9 years ago
There were many changes to print.php.  So if you have changes on your end you'd 
like to push into svn, please let me know.

Also, for my version of PHP, I changed the way POST is recognized.

$json = json_decode(file_get_contents('php://input')); // 
json_decode($HTTP_RAW_POST_DATA);

If your end doesn't see any POST data, we can roll that back.

Original comment by cpl...@gmail.com on 7 Jan 2013 at 4:48

GoogleCodeExporter commented 9 years ago
So you could roll it back to only be:

$json = json_decode($HTTP_RAW_POST_DATA);

Original comment by cpl...@gmail.com on 7 Jan 2013 at 5:16

GoogleCodeExporter commented 9 years ago
Printing the basic basemap and tilesets works.

However, if I make a non-basemap tileset (such as Structures or Tax Parcels) 
partially transparent I get a blank map image in the print layout. 

Also, if I make the MassGIS basemap somewhat transparent it does not transfer 
to the map images (I get a map image, but it's fully opaque.)

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 2:56

GoogleCodeExporter commented 9 years ago
Printing works, but it also seems to take a fairly long time.
For this map, which has the MassGIS basemap and 3 tilesets, I counted 31 blue 
bar sweeps from left to right as I looked at the "Please wait...".  If Saul 
increases the speed of loading tiles will this improve?  Does OLIVER need to 
request the tiles again, is that what takes the time? 

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 3:00

GoogleCodeExporter commented 9 years ago
Here's a Permalink for a non-basemap tileset being partially transparent where 
this print ends up in a blank map on the print layout page: 

http://maps.massgis.state.ma.us/map_ol_tile/oliver.php?lyrs=Structures~Basemaps_
Structures~&bbox=-71.05001813301335,42.453474474289415,-71.04568636545527,42.455
30106715717&coordUnit=m&measureUnit=m&base=MassGIS_Basemap¢er=-7909010.7343405,
5229289.4289976&zoom=19&opacity=0.4&baseO=1&filt=undefined

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 3:01

GoogleCodeExporter commented 9 years ago
Here's a Permalink for the MassGIS basemap being partially transparent where 
this print ends up with a fully opaque map on the print layout page:

http://maps.massgis.state.ma.us/map_ol_tile/oliver.php?lyrs=Structures~Basemaps_
Structures~&bbox=-71.05001813301335,42.453474474289415,-71.04568636545527,42.455
30106715717&coordUnit=m&measureUnit=m&base=MassGIS_Basemap¢er=-7909010.7343405,
5229289.4289976&zoom=19&opacity=1&baseO=0.38&filt=undefined

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 3:02

GoogleCodeExporter commented 9 years ago
It took me a while to figure this out.  I believe the problem is that your 
MassGIS Basemap tiles are all JPG, and when the print engine is run, it cannot 
apply an opacity to a JPG.  Your Structures tileset works fine because those 
are PNG's.

The opacity changes you see in the browser for MassGIS Basemap are just browser 
tricks.  It's a different game when composing the final print image.

As far as time goes.  Yes, those tiles are crazy slow to come back from the 
server.

Original comment by cpl...@gmail.com on 18 Jan 2013 at 4:04

GoogleCodeExporter commented 9 years ago
The JPG comment makes sense.  If we wanted opacity we should have made PNGs!  
We're probably not going to go there.  So I guess there's nothing to be done on 
that one.

For the other - are you saying it's not possible for tilesets like it is for 
vector WMS images? 

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 4:07

GoogleCodeExporter commented 9 years ago
I'm not sure what you mean by 'for the other'.  Structures is a tileset whose 
transparency appears OK on a print page because they are all PNG's.

Original comment by cpl...@gmail.com on 18 Jan 2013 at 4:09

GoogleCodeExporter commented 9 years ago
Sorry, it's not clear yet, did you change anything in the code?  
There were two problems, one you are saying is not fixable (the MassGIS basemap 
which is JPG) and the other - the non-basemap tileset which is printing a blank 
map.... can that print properly? 

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 4:11

GoogleCodeExporter commented 9 years ago
Oh.  So you're referring to comment #6?  I'm not seeing a problem, though.  I 
visited that link, clicked print, and ended up w/ 
http://maps.massgis.state.ma.us/temp/OL_MORIS_print/1358525755.762214932.html.

Original comment by cpl...@gmail.com on 18 Jan 2013 at 4:17

GoogleCodeExporter commented 9 years ago
NOW it works for me. 

OK, I think this is all set then. 

Original comment by Aleda.Fr...@state.ma.us on 18 Jan 2013 at 4:22