[OpenLayers-Users] printProvider.scales change problem

konto gmail specjal at gmail.com
Sun Mar 13 11:28:25 EDT 2011


Hi

I try do add some vector print extend to my map...it works fine but
when i try change scale value (from print form, so it should make
biger or smaller ), my vector layer dissapear. But scale set
	selection are correct send to print.

The second problem is  with map print area, when i move vector polygon
(print extent) it olways print region which it start (center of map).



//definisions

    var printProvider = new GeoExt.data.PrintProvider({
        method: "GET", // "POST" recommended for production use
        capabilities: printCapabilities, // from the info.json script
in the html
        customParams: {
            mapTitle: "Printing Demo"
        }
    });

    printPage = new GeoExt.data.PrintPage({
        printProvider: printProvider
    });


//print form expand item (accordion)


printPage.setCenter(new
OpenLayers.LonLat(map.getCenter().lon,map.getCenter().lat));
var scale2 = printProvider.scales.getAt(7);
printPage.setScale(scale2, "m");


pageLayer = new OpenLayers.Layer.Vector();
pageLayer.addFeatures(printPage.feature);
map.addLayers( [pageLayer ]);
pageDrag = new OpenLayers.Control.DragFeature(pageLayer);
map.addControl(pageDrag);
pageDrag.activate();


More information about the Users mailing list