Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR com.lynden.gmapsfx.GoogleMapView - Error: User data directory [null (C:\Users\Admin\AppData\Roaming\application.Main\webview)] is already in use #188

Open
lorenzopantano opened this issue Feb 11, 2020 · 0 comments

Comments

@lorenzopantano
Copy link

I get this error and I only see a blank page. Also it gives me a:
INFO com.lynden.gmapsfx.GoogleMapView - Alert: Hide directions called
I'm using JAVAFX11 Library on Eclipse, I've edit my run configuration to add javafx.web module.
I think that the problem occurs when I create a GoogleMapView object but I'dont know how to resolve! Thanks in advice to anyone who can help me.

This is my controller:

`
package controllers;

import java.net.URL;
import java.util.ResourceBundle;

import com.lynden.gmapsfx.GoogleMapView;
import com.lynden.gmapsfx.MapComponentInitializedListener;
import com.lynden.gmapsfx.javascript.object.GoogleMap;
import com.lynden.gmapsfx.javascript.object.LatLong;
import com.lynden.gmapsfx.javascript.object.MapOptions;
import com.lynden.gmapsfx.javascript.object.MapTypeIdEnum;
import com.lynden.gmapsfx.service.geocoding.GeocodingService;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;

public class GMaps_Controller implements Initializable, MapComponentInitializedListener{

@FXML
private GoogleMapView gmapView;

@FXML
private TextField nomeField;

@FXML
private TextField capField;

@FXML
private TextField addressField;

@FXML
private Button findAddress;

@FXML
private Button findCap;

@FXML
private Button findNome;

private GoogleMap map;

private GeocodingService geocodingService;

private StringProperty address = new SimpleStringProperty();

@FXML
void findAddressPushed(ActionEvent event) {

}

@FXML
void findCapPushed(ActionEvent event) {

}

@FXML
void findNomePushed(ActionEvent event) {

}

@Override
public void initialize(URL location, ResourceBundle resources) {
	
	gmapView.addMapInializedListener(this);
    address.bind(addressField.textProperty());

}

@Override
public void mapInitialized() {
	
	geocodingService = new GeocodingService();
    MapOptions mapOptions = new MapOptions();
    
    mapOptions.center(new LatLong(41.8919300, 12.5113300))
            .mapType(MapTypeIdEnum.ROADMAP)
            .overviewMapControl(false)
            .panControl(false)
            .rotateControl(false)
            .scaleControl(false)
            .streetViewControl(false)
            .zoomControl(false)
            .zoom(12);

    map = gmapView.createMap(mapOptions);
	
}

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant