Package org.geotools.map

Examples of org.geotools.map.MapContext


    }

    public SVGGraphics2D createSVGMap(final StreamingRenderer renderer,
            final WMSMapContext mapContext) throws ServiceException, IOException {
        try {
            MapContext map = renderer.getContext();
            double width = -1;
            double height = -1;

            if (map instanceof WMSMapContext) {
                WMSMapContext wmsMap = (WMSMapContext) map;
                width = wmsMap.getMapWidth();
                height = wmsMap.getMapHeight();
            } else {
                // guess a width and height based on the envelope
                Envelope area = map.getAreaOfInterest();

                if ((area.getHeight() > 0) && (area.getWidth() > 0)) {
                    if (area.getHeight() >= area.getWidth()) {
                        height = 600;
                        width = height * (area.getWidth() / area.getHeight());
View Full Code Here

TOP

Related Classes of org.geotools.map.MapContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.