Package org.geomajas.command.dto

Examples of org.geomajas.command.dto.GetMapConfigurationResponse


    Assert.assertEquals(170.102257, configMaxExtent.getHeight(), DOUBLE_TOLERANCE);

    GetMapConfigurationRequest request = new GetMapConfigurationRequest();
    request.setApplicationId("simplevectors");
    request.setMapId("coordTestMap");
    GetMapConfigurationResponse response = (GetMapConfigurationResponse) dispatcher.execute(
        GetMapConfigurationRequest.COMMAND, request, null, "en");
    if (response.isError()) {
      response.getErrors().get(0).printStackTrace();
    }
    Assert.assertFalse(response.isError());
    ClientMapInfo mapInfo = response.getMapInfo();
    Assert.assertNotNull(mapInfo);
    Bbox mapMaxExtent = mapInfo.getLayers().get(0).getMaxExtent();
    // these values were registered during a first run, they have *not* been externally verified
    Assert.assertEquals(-9467848.347161204, mapMaxExtent.getX(), DOUBLE_TOLERANCE);
    Assert.assertEquals(-2.0037508342789236E7, mapMaxExtent.getY(), DOUBLE_TOLERANCE);
View Full Code Here


    commandRequest.setCommandRequest(new GetMapConfigurationRequest(id, applicationId));
    GwtCommandDispatcher.getInstance().execute(commandRequest, new CommandCallback() {

      public void execute(CommandResponse response) {
        if (response instanceof GetMapConfigurationResponse) {
          GetMapConfigurationResponse r = (GetMapConfigurationResponse) response;
          initializationCallback(r);
        }
      }
    });
  }
View Full Code Here

  @Autowired
  private SecurityContext securityContext;

  public GetMapConfigurationResponse getEmptyCommandResponse() {
    return new GetMapConfigurationResponse();
  }
View Full Code Here

    cmdService.execute(commandRequest, new CommandCallback() {

      public void onSuccess(CommandResponse response) {
        if (response instanceof GetMapConfigurationResponse) {
          // Initialize the MapModel and ViewPort:
          GetMapConfigurationResponse r = (GetMapConfigurationResponse) response;

          // Configure the ViewPort. This will immediately zoom to the initial bounds:
          viewPort.setMapSize(display.asWidget().getOffsetWidth(), display.asWidget().getOffsetHeight());
          layersModel.initialize(r.getMapInfo(), viewPort, eventBus);
          viewPort.initialize(r.getMapInfo(), eventBus);

          // Immediately zoom to the initial bounds as configured:
          Bbox initialBounds = factory.createBbox(r.getMapInfo().getInitialBounds());
          viewPort.applyBounds(initialBounds);

          // If there are already some MapGadgets registered, draw them now:
          for (Entry<MapGadget, ScreenContainer> entry : gadgets.entrySet()) {
            entry.getKey().onDraw(viewPort, entry.getValue());
          }

          // Initialize the FeatureSelecrtionRenderer:
          selectionRenderer.initialize(r.getMapInfo());

          addMapGadget(new ScalebarGadget(r.getMapInfo()));
          addMapGadget(new WatermarkGadget());
          addMapGadget(new NavigationGadget());

          // Fire initialization event:
          eventBus.fireEvent(new MapInitializationEvent());
View Full Code Here

TOP

Related Classes of org.geomajas.command.dto.GetMapConfigurationResponse

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.