nakijun / morisoliver

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

Other datalayer overlays won't print when using the new Digital Globe orthos basemaps #221

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When printing the Digital Globe orthos, other datalayer overlays won't print.  

Try this - here is our new basemaps of JPG, with Colleges on top.  If I print, 
I see the orthos and the legend for the colleges, but not the colleges on the 
map. 

http://maps.massgis.state.ma.us/map_ol/oliver.php?lyrs=Colleges%20and%20Universi
ties%20Buildings~massgis:GISDATA.COLLEGES_PT~GISDATA.COLLEGES_PT::Default&bbox=-
76.12447997985045,40.90271840909617,-67.25302002014791,43.18675440206086&coordUn
it=m&measureUnit=m&base=Digital%20Globe%20Orthophotos%202011-2012&center=-798035
5.1456062,5169222.1666416&zoom=8&opacity=1&baseO=1&filt=undefined

(Are the orthos on top or something?) Here is the POST from Firebug: 

{"w":"1615px","h":"560px","extent":[-8227246.746933,5083612.6949741,-7733463.544
2794,5254831.6383091],"layers":{"Colleges and Universities 
Buildings":[{"url":"http://giswebservices.massgis.state.ma.us/geoserver/wms?LAYE
RS=massgis%3AGISDATA.COLLEGES_PT&TRANSPARENT=TRUE&STYLES=GISDATA.COLLEGES_PT%3A%
3ADefault&STYLE=GISDATA.COLLEGES_PT%3A%3ADefault&FOO=Colleges%20and%20Universiti
es%20Buildings&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&FORMAT=image%2Fpng&SRS=E
PSG%3A900913","x":0,"y":0,"opacity":1}],"Digital Globe Orthophotos 
2011-2012":[{"url":"http://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_Digita
lGlobe2011_2012/9/188/150.jpg","x":-227,"y":-221,"opacity":1,"grid":true},{"url"
:"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/188/151.jp
g","x":29,"y":-221,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd.state.ma
.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/188/152.jpg","x":285,"y":-221,
"opacity":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Orthos_Dig
italGlobe2011_2012/9/188/153.jpg","x":541,"y":-221,"opacity":1,"grid":true},{"ur
l":"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/188/154.
jpg","x":797,"y":-221,"opacity":1,"grid":true},{"url":"http://170.63.206.116/til
es/Basemaps_Orthos_DigitalGlobe2011_2012/9/188/155.jpg","x":1053,"y":-221,"opaci
ty":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGl
obe2011_2012/9/188/156.jpg","x":1309,"y":-221,"opacity":1,"grid":true},{"url":"h
ttp://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/188
/157.jpg","x":1565,"y":-221,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd
.state.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/189/150.jpg","x":-227
,"y":35,"opacity":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Or
thos_DigitalGlobe2011_2012/9/189/151.jpg","x":29,"y":35,"opacity":1,"grid":true}
,{"url":"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/189
/152.jpg","x":285,"y":35,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd.st
ate.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/189/153.jpg","x":541,"y"
:35,"opacity":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Orthos
_DigitalGlobe2011_2012/9/189/154.jpg","x":797,"y":35,"opacity":1,"grid":true},{"
url":"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/189/15
5.jpg","x":1053,"y":35,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd.stat
e.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/189/156.jpg","x":1309,"y":
35,"opacity":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Orthos_
DigitalGlobe2011_2012/9/189/157.jpg","x":1565,"y":35,"opacity":1,"grid":true},{"
url":"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/190/15
0.jpg","x":-227,"y":291,"opacity":1,"grid":true},{"url":"http://170.63.206.116/t
iles/Basemaps_Orthos_DigitalGlobe2011_2012/9/190/151.jpg","x":29,"y":291,"opacit
y":1,"grid":true},{"url":"http://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_
DigitalGlobe2011_2012/9/190/152.jpg","x":285,"y":291,"opacity":1,"grid":true},{"
url":"http://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_201
2/9/190/153.jpg","x":541,"y":291,"opacity":1,"grid":true},{"url":"http://gisprpx
y.itd.state.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/190/154.jpg","x"
:797,"y":291,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd.state.ma.us/ti
les/Basemaps_Orthos_DigitalGlobe2011_2012/9/190/155.jpg","x":1053,"y":291,"opaci
ty":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGl
obe2011_2012/9/190/156.jpg","x":1309,"y":291,"opacity":1,"grid":true},{"url":"ht
tp://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/190/
157.jpg","x":1565,"y":291,"opacity":1,"grid":true},{"url":"http://170.63.206.116
/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/191/150.jpg","x":-227,"y":547,"op
acity":1,"grid":true},{"url":"http://170.63.206.116/tiles/Basemaps_Orthos_Digita
lGlobe2011_2012/9/191/151.jpg","x":29,"y":547,"opacity":1,"grid":true},{"url":"h
ttp://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/191
/152.jpg","x":285,"y":547,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd.s
tate.ma.us/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/191/153.jpg","x":541,"y
":547,"opacity":1,"grid":true},{"url":"http://gisprpxy.itd.state.ma.us/tiles/Bas
emaps_Orthos_DigitalGlobe2011_2012/9/191/154.jpg","x":797,"y":547,"opacity":1,"g
rid":true},{"url":"http://gisprpxy.itd.state.ma.us/tiles/Basemaps_Orthos_Digital
Globe2011_2012/9/191/155.jpg","x":1053,"y":547,"opacity":1,"grid":true},{"url":"
http://170.63.206.116/tiles/Basemaps_Orthos_DigitalGlobe2011_2012/9/191/156.jpg"
,"x":1309,"y":547,"opacity":1,"grid":true},{"url":"http://170.63.206.116/tiles/B
asemaps_Orthos_DigitalGlobe2011_2012/9/191/157.jpg","x":1565,"y":547,"opacity":1
,"grid":true}]},"legends":{"Colleges and Universities 
Buildings":"http://giswebservices.massgis.state.ma.us/geoserver/wms?LAYER=massgi
s%3AGISDATA.COLLEGES_PT&TRANSPARENT=TRUE&STYLES=GISDATA.COLLEGES_PT%3A%3ADefault
&STYLE=GISDATA.COLLEGES_PT%3A%3ADefault&FOO=Colleges%20and%20Universities%20Buil
dings&VERSION=1.1.1&SERVICE=WMS&REQUEST=GetLegendGraphic&FORMAT=image%2Fpng&SRS=
EPSG%3A900913"},"scaleLineTop":{"w":"44px","val":"10 
km"},"scaleLineBottom":{"w":"71px","val":"10 mi"}}

Original issue reported on code.google.com by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 1:48

GoogleCodeExporter commented 9 years ago
Apparently the Permalink is also broken for this new basemap.. I made Issue 223 
for that.  Alternatively for this issue:

Open basic OLIVER 
http://maps.massgis.state.ma.us/map_ol/oliver.php
In the Basemaps button bottom left add Digital Globe
Add Colleges
Try to print.

Original comment by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 3:05

GoogleCodeExporter commented 9 years ago
The interesting this is that print (and Permalink) work fine for the OTHER 
MassGIS Basemap - 

http://maps.massgis.state.ma.us/map_ol/oliver.php?lyrs=Colleges%20and%20Universi
ties%20Buildings~massgis:GISDATA.COLLEGES_PT~GISDATA.COLLEGES_PT::Default&bbox=-
80.56020995970171,39.73000304606611,-62.817290040296655,44.297905314315635&coord
Unit=m&measureUnit=m&base=MassGIS_Basemap¢er=-7980355.1456062,5169222.1666416&z
oom=7&opacity=1&baseO=1&filt=undefined

So maybe I mis-configured something when adding the new Digital Globe basemap?  

I notice... that one that works has no spaces and the one that doesn't work has 
spaces... maybe I should change that and see if it makes a difference... 

Original comment by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 3:08

GoogleCodeExporter commented 9 years ago
Well, no luck. I have another OLIVER oliver_thurs.php which uses map_thurs.js 
where I have changed the name of basemap slightly so that the Permalink base= 
value doesn't have spaces.  But that didn't help the Permalink or the print.

I had change

  lyrBase['Basemaps_Orthos_DigitalGlobe2011_2012'] = new OpenLayers.Layer.OSM(
     'Digital Globe Orthophotos 2011-2012'

so that Digital Globe Orthophotos 2011-2012 was 
Basemaps_Orthos_DigitalGlobe2011_2012 which is more consistent with what I did 
with MassGIS_Basemap. 

Original comment by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 3:16

GoogleCodeExporter commented 9 years ago
Note re: #3 Actually, once I got the name correct in map.js (so it matched what 
was in availableBase exactly) the Permalink started to work, but the print 
issue still is there.

Original comment by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 3:35

GoogleCodeExporter commented 9 years ago
After some experimentation we have a clarified problem statement:

"If the user tries to print a map where the basemap in the map view is the same 
basemap defined in the .php as defaultBase var, then that basemap will print 
underneath the other layer in the printout. However, if the user tries to print 
a map where they have changed basemaps from the particular basemap defined in 
defaultBase then the basemap will print on top of all other layers in the 
printout.  The correct basemap will always print - the issue is the ordering of 
the various layers in the layers variable as see in Firefox."

Original comment by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 6:30

GoogleCodeExporter commented 9 years ago
Use case 1:  User opens OLIVER which has a defaultBase of MassGIS_Basemap.  
They add the colleges datalayer and print - MassGIS_Basemap is on the bottom as 
it should be an colleges on top.  Next, user decides to switch basemaps and 
chooses the Digital Globe basemap.  User prints, but now the Digital Globe 
basemap is on top of colleges.(obscuring them). 

Use case 2:  If another "OLIVER" is setup with Digital Globe as the defaultBase 
and the user adds colleges and prints - Digital Globe is under colleges as it 
should be.  If the user decides to switch basemaps to MassGIS_Basemap and print 
- MassGIS_Basemap is then on top of colleges (obscuring them). 

There is nothing wrong with either of the basemaps.  Only that the print order 
is correct if the current map being printed is using the defaultBase defined 
basemap.  If it's using a different one, the printing order is incorrect, with 
the different basemap always on top of all other layers.

Original comment by Aleda.Fr...@state.ma.us on 11 Jul 2013 at 6:35

GoogleCodeExporter commented 9 years ago
Almost...

I made an oliver_fixdg.php that point to map_fixdg.js so we can compare 
original to yours.

I use 3 layers - DG basemap, buildings tileset, vector point layer fire 
stations.  The order is of course DG bottom, the solid color building then fire 
station point on top of building. 

Regular OLIVER Permalink:

http://maps.massgis.state.ma.us/map_ol/oliver.php?lyrs=Structures~Basemaps_Struc
tures~|Fire%20Stations~massgis:GISDATA.FIRESTATIONS_PT_MEMA~GISDATA.FIRESTATIONS
_PT_MEMA::Default&bbox=-73.1150508532905,42.697305737378976,-73.11071908573241,4
2.6986954742862&coordUnit=m&measureUnit=m&base=Basemaps_Orthos_DigitalGlobe2011_
2012¢er=-8138889.1252332,5266116.8489366&zoom=19&opacity=1,1&baseO=1&filt=undef
ined|undefined

of course, print that and you see the bug of DG printing on top of structures 
and fire stations, but structures is under fire stations. 

Your fix: 

http://maps.massgis.state.ma.us/map_ol/oliver_fixdg.php?lyrs=Structures~Basemaps
_Structures~|Fire%20Stations~massgis:GISDATA.FIRESTATIONS_PT_MEMA~GISDATA.FIREST
ATIONS_PT_MEMA::Default&bbox=-73.1150508532905,42.697305737378976,-73.1107190857
3241,42.6986954742862&coordUnit=m&measureUnit=m&base=Basemaps_Orthos_DigitalGlob
e2011_2012¢er=-8138889.1252332,5266116.8489366&zoom=19&opacity=1,1&baseO=1&filt
=undefined|undefined 

print that and DG is on the bottom, but the other layers  are in upside down 
order.  So fire stations are obscured under structures.

Original comment by Aleda.Fr...@state.ma.us on 4 Sep 2013 at 3:14

GoogleCodeExporter commented 9 years ago
Please give v519 a shot.

Make sure that your control .php's don't point to anything other than 
js/map.js.php.

Original comment by cpl...@gmail.com on 12 Sep 2013 at 6:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
r521 please.

Original comment by cpl...@gmail.com on 12 Sep 2013 at 7:18

GoogleCodeExporter commented 9 years ago
This tests well, I put it into production.

Original comment by Aleda.Fr...@state.ma.us on 16 Sep 2013 at 8:44