Examples of GoogleMapsService


Examples of slash.navigation.googlemaps.GoogleMapsService

    }

    private void searchPositions() {
        DefaultListModel listModel = new DefaultListModel();
        listResult.setModel(listModel);
        GoogleMapsService service = new GoogleMapsService();
        try {
            List<NavigationPosition> positions = service.getPositionsFor(textFieldSearch.getText());
            if (positions != null) {
                for (NavigationPosition position : positions) {
                    listModel.addElement(position);
                }
                if (listModel.getSize() > 0) {
View Full Code Here

Examples of slash.navigation.googlemaps.GoogleMapsService

    private final List<ElevationService> elevationServices = new ArrayList<>();
    private boolean loggedFailedWarning = false;

    public ElevationServiceFacade() {
        elevationServices.add(new GeoNamesService());
        elevationServices.add(new GoogleMapsService());
        elevationServices.add(new EarthToolsService());
    }
View Full Code Here

Examples of slash.navigation.googlemaps.GoogleMapsService

                                    final PositionsModel positionsModel,
                                    final int[] rows,
                                    final OverwritePredicate predicate) {
        executeOperation(positionsTable, positionsModel, rows, true, predicate,
                new Operation() {
                    private GoogleMapsService googleMapsService = new GoogleMapsService();

                    public String getName() {
                        return "CoordinatesPositionAugmenter";
                    }

                    public int getColumnIndex() {
                        return ALL_COLUMNS; // LONGITUDE_COLUMN_INDEX + LATITUDE_COLUMN_INDEX;
                    }

                    public void performOnStart() {
                    }

                    public boolean run(int index, NavigationPosition position) throws Exception {
                        NavigationPosition coordinates = googleMapsService.getPositionFor(position.getDescription());
                        if (coordinates != null)
                            positionsModel.edit(index,
                                    new PositionColumnValues(asList(LONGITUDE_COLUMN_INDEX, LATITUDE_COLUMN_INDEX),
                                            Arrays.<Object>asList(coordinates.getLongitude(), coordinates.getLatitude())), false, true);
                        return coordinates != null;
View Full Code Here

Examples of slash.navigation.googlemaps.GoogleMapsService

                                    final PositionsModel positionsModel,
                                    final int[] rows,
                                    final OverwritePredicate predicate) {
        executeOperation(positionsTable, positionsModel, rows, true, predicate,
                new Operation() {
                    private GoogleMapsService googleMapsService = new GoogleMapsService();

                    public String getName() {
                        return "PostalAddressPositionAugmenter";
                    }

                    public int getColumnIndex() {
                        return DESCRIPTION_COLUMN_INDEX;
                    }

                    public void performOnStart() {
                    }

                    public boolean run(int index, NavigationPosition position) throws Exception {
                        String description = googleMapsService.getLocationFor(position.getLongitude(), position.getLatitude());
                        if (description != null)
                            positionsModel.edit(index, new PositionColumnValues(DESCRIPTION_COLUMN_INDEX, description), false, true);
                        return description != null;
                    }
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.