Package org.opentripplanner.analyst.request

Examples of org.opentripplanner.analyst.request.TileRequest


    @Produces("image/*")
    public Response tileGet() throws Exception {

        // Re-use analyst
        Envelope2D env = SlippyTile.tile2Envelope(x, y, z);
        TileRequest tileRequest = new TileRequest(routerId, env, 256, 256);

        BufferedImage image = otpServer.tileRendererManager.renderTile(tileRequest, layer);

        MIMEImageFormat format = new MIMEImageFormat("image/" + ext);
        ByteArrayOutputStream baos = new ByteArrayOutputStream(image.getWidth() * image.getHeight() / 4);
View Full Code Here


        Envelope2D env = SlippyTile.tile2Envelope(x, y, z);
        TimeSurface surfA = server.surfaceCache.get(surfaceId);
        if (surfA == null) return badRequest("Unrecognized surface ID.");
         
        TileRequest tileRequest = new TileRequest(surfA.routerId, env, 256, 256);
      
        MIMEImageFormat imageFormat = new MIMEImageFormat("image/png");
        RenderRequest renderRequest =
                new RenderRequest(imageFormat, Layer.TRAVELTIME, Style.COLOR30, true, false);
        // TODO why can't the renderer be static?
View Full Code Here

    @GET @Produces("image/*")
    public Response tileGet() throws Exception {
       
        Envelope2D env = SlippyTile.tile2Envelope(x, y, z);
        TileRequest tileRequest = new TileRequest("", env, 256, 256);
        RoutingRequest sptRequestA = buildRequest(0);
        RoutingRequest sptRequestB = buildRequest(1);

        Layer layer = layers.get(0);
        Style style = styles.get(0);
View Full Code Here

        if (resolution != null) {
            width  = (int) Math.ceil(bbox.width  / resolution);
            height = (int) Math.ceil(bbox.height / resolution);
        }
       
        TileRequest tileRequest = new TileRequest("", bbox, width, height);
        SPTRequest sptRequest = new SPTRequest(x, y, time.cal);
        RenderRequest renderRequest = new RenderRequest(format, Layer.TRAVELTIME, Style.GRAY, false, false);

        return null; //renderer.getResponse(tileRequest, sptRequest, null, renderRequest);
       
View Full Code Here

TOP

Related Classes of org.opentripplanner.analyst.request.TileRequest

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.