What Im trying to achieve is display points on a map using postcode. I found a script that does this for one postcode, but I would like to display a few at once. So I was thinking of changing the code around a little so the map was created in the first class.
My question is, how do I transfer the values of Class B to Class A? 2 values 'lng' and 'lat' need to be an array
My full code is here if that makes more sense http://pastebin.com/L6tcuPW9
Any help would be great
Class A extents FragmentActivity
{
}
This class gets retrieves the lng and lat values
Class B
{
public static double[] lat;
public static double[] lng;
public void retrievePost( String post)
{
// does a search and retrieves lng and lat
setLat(lat);
setLng(lng);
}
public static void setLat(double lat2)
{
// How do I get this value back into Class A
}
public static void setLng(double lng2)
{
// How do I get this value back into Class A
}
}