Skip to content

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

@lorenzopantano

Description

@lorenzopantano

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);
	
}

}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions