Examples of MapEntity


Examples of aimax.osm.data.entities.MapEntity

        || debug)
      entities.add(entity);
    if (entity instanceof MapNode) {
      MapNode mNode = (MapNode) entity;
      for (WayRef ref : mNode.getWayRefs()) {
        MapEntity me = ref.getWay();
        if (me.getName() != null || me.getAttributes().length > 0
            || debug)
          entities.add(me);
      }
    }
    boolean done = false;
    for (int i = 0; i < entities.size() && !done; i++) {
      MapEntity me = entities.get(i);
      Object[] content = new Object[] { "", "", "" };
      String text = (me.getName() != null) ? me.getName() : "";
      if (debug)
        text += " (" + ((me instanceof MapNode) ? "Node " : "Way ")
            + me.getId() + ")";
      content[0] = text;
      if (me instanceof MapNode) {
        PositionPanel pos = new PositionPanel();
        pos.setPosition(((MapNode) me).getLat(), ((MapNode) me)
            .getLon());
        pos.setEnabled(false);
        content[1] = pos;
      }
      if (me.getAttributes().length > 0) {
        EntityAttribute[] atts = me.getAttributes();
        String[][] attTexts = new String[atts.length][2];
        for (int j = 0; j < atts.length; j++) {
          attTexts[j][0] = atts[j].getKey();
          attTexts[j][1] = atts[j].getValue();
        }
View Full Code Here

Examples of aimax.osm.data.entities.MapEntity

    resultTable.setDefaultRenderer(Object.class, new NodeRenderer());
    resultTable.addMouseListener(new MouseAdapter() {
      public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2) {
          int row = resultTable.getSelectedRow();
          MapEntity entity = (MapEntity) resultTable.getValueAt(row,
              0);
          MapViewPane view = FindPanel.this.view;
          view.showMapEntityInfoDialog(entity, view.getRenderer()
              .isDebugModeEnabled());
        }
View Full Code Here

Examples of aimax.osm.data.entities.MapEntity

      super();
    }

    public void setValue(Object value) {
      if (value instanceof MapNode || value instanceof MapWay) {
        MapEntity entity = (MapEntity) value;
        String text = entity.getName() != null ? entity.getName()
            : "ID=" + entity.getId();
        Position pos = entityFinder.getRefPosition();
        if (pos != null) {
          DecimalFormat f1 = new DecimalFormat("#0.00");
          text += " (" + f1.format(pos.getDistKM(entity)) + " km)";
        }
View Full Code Here

Examples of com.netflix.explorers.model.MapEntity

    }

    @GET
    @Path("explorers/config")
    public MapEntity getConfig() {
        return new MapEntity(ConfigurationConverter.getMap(manager.getConfiguration()));
    }
View Full Code Here

Examples of com.pointcliki.dizgruntled.map.MapEntity

   
    // Create human player
    fHuman = new HumanPlayer("human");
    fPlayerManager.add(fHuman);
               
    final MapEntity fMapViewer = new MapEntity(fMapManager.map(), new Vector2f(fGame.application().getScreenWidth(), fGame.application().getScreenHeight()));
    addChild(fMapViewer);
    fMapViewer.init();
   
    Minion<TimeEvent> scroller = new Minion<TimeEvent>() {
      public long run(com.pointcliki.event.Dispatcher<TimeEvent> dispatcher, String type, TimeEvent event) {
        if (GruntzGame.inputManager().isKeyPressed(Keyboard.KEY_RIGHT)) fMapViewer.offset(new Vector2f(Math.min(Math.max(fMapViewer.offset().x - event.delta() / 2f, -fMapViewer.map().width() * 32f + fSW), 0), fMapViewer.offset().y));
        else if (GruntzGame.inputManager().isKeyPressed(Keyboard.KEY_LEFT)) fMapViewer.offset(new Vector2f(Math.min(Math.max(fMapViewer.offset().x + event.delta() / 2f, -fMapViewer.map().width() * 32 + fSW), 0), fMapViewer.offset().y));
        if (GruntzGame.inputManager().isKeyPressed(Keyboard.KEY_DOWN)) fMapViewer.offset(new Vector2f(fMapViewer.offset().x, Math.min(Math.max(fMapViewer.offset().y - event.delta() / 2f, -fMapViewer.map().height() * 32 + fSH), 0)));
        else if (GruntzGame.inputManager().isKeyPressed(Keyboard.KEY_UP)) fMapViewer.offset(new Vector2f(fMapViewer.offset().x, Math.min(Math.max(fMapViewer.offset().y + event.delta() / 2f, -fMapViewer.map().height() * 32 + fSH), 0)));
        return Minion.CONTINUE;       
      };
    };
    timeManager().dispatcher().addMinion(TimeEvent.TYPE, scroller);
   
View Full Code Here

Examples of com.pointcliki.dizgruntled.map.MapEntity

  }
 
  private void setupMapViewer() {
    fMapManager.map().editing(true);

    fMapViewer = new MapEntity(fMapManager.map(), new Vector2f(fSW - 176, fSH - 40));
    fMapViewer.offset(new Vector2f(16, 16));
    fMapViewer.position(new Vector2f(0, 28));
    addChild(fMapViewer, 0);
    fMapViewer.init();
   
View Full Code Here

Examples of org.pollux3d.map.MapEntity

  }

  public void onPolluxEvent(PolluxEvent event) {
    if (event instanceof MapEntityClickEvent) {
      MapEntityClickEvent clickEvent = (MapEntityClickEvent) event;
      MapEntity entity = clickEvent.getEntity();
      //added by floh -- 31/10/2011
      //play sound when clicked on markable
      polluxApp.getAudioRenderer().playSourceInstance(audio_click);
      if (entity instanceof CamTarget) {
        stateManager.getCamAnimation().setTarget((CamTarget) entity);
View Full Code Here

Examples of org.pollux3d.map.MapEntity

        listener.onPolluxEvent(new NothingHitClickEvent(this.getClass().getName()));
      }
    } else {
      for (int i = 0; i < results.size(); i++) {   
        try {
          MapEntity me = Pollux.get().getGeometryManager().getMapEntity(results.getCollision(i).getGeometry());
          if (listener != null) {
            listener.onPolluxEvent(new MapEntityClickEvent(this.getClass().getName(), me));
          }
        } catch (Exception e) {  }
         
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.