Package aimax.osm.data

Examples of aimax.osm.data.OsmMap


    }

    @SuppressWarnings("unchecked")
    @Override
    protected void initMapAndClassifier() {
      OsmMap map = (OsmMap) createComponent(MAP_CLASS_PROPERTY,
          OsmMap.class);
      if (map == null)
        map = new DefaultMap();
      view.setMap(map);
      classifier = (EntityClassifier<EntityViewInfo>) createComponent(
View Full Code Here


  }
 
  /** Starts route generation after the calculate button has been pressed. */
  public void actionPerformed(ActionEvent e) {
    if (e.getSource() == calcButton) {
      OsmMap mapData = frame.getMap();
      List<Position> positions = routeCalculator.calculateRoute
      (mapData.getMarkers(), mapData, waySelection.getSelectedIndex());
      frame.getMap().createTrack(ROUTE_TRACK_NAME, positions);
    }
  }
View Full Code Here

  class MyGpsPositionListener implements GpsPositionListener {
    @Override
    public void positionUpdated(GpsFix pos) {
      if (pos.isPosOk()) {
        OsmMap mapData = frame.getMap();
        Track track = mapData.getTrack(GPS_TRACK_NAME);
        MapNode node = null;
        if (track != null)
          node = track.getLastNode();
        if (node == null || pos.getDistKM(node) > 0.01) {
          mapData.addToTrack(GPS_TRACK_NAME, pos);
          if (gpsCombo.getSelectedIndex() == 2
              || gpsCombo.getSelectedIndex() == 3)
            frame.getView().adjustToCenter(pos.getLat(),
                pos.getLon());
        }
View Full Code Here

TOP

Related Classes of aimax.osm.data.OsmMap

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.