package lu.tudor.santec.gecamed.address.gui.widgets;

import javax.swing.JOptionPane;

import lu.tudor.santec.gecamed.core.gui.MainFrame;
import lu.tudor.santec.gecamed.core.gui.utils.UrlOpener;

public class MapOpener
{
	
	public static void openMap (String addressString)
	{
		if (!UrlOpener.openURL("http://maps.google.com/?q=" + addressString))
		{
			JOptionPane.showMessageDialog(MainFrame.getInstance(),
					"http://maps.google.com/",
					"Error launching Browser",
					JOptionPane.WARNING_MESSAGE);
		}
	}
}
