You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find a way to get the location of MyLocationOverlay marker. For the time being, I hacked this into PolarisMapView. Not sure if this is omitted on purpose but since PolarisMapView wraps MyLocationOverlay into it so I think adding this will simplify the usage a little bit. Or should we rely on LocationListener instead?
/**
* Return current location of {@link MyLocationOverlay}.
* @return GeoPoint or null if disabled.
*/
public GeoPoint getMyLocation(){
if(mMyLocationOverlay != null){
return mMyLocationOverlay.getMyLocation();
}
return null;
}
The text was updated successfully, but these errors were encountered:
I am planning to add interface to access MyLocationOverlay's callback method such as runOnFirstFix, onSensorChanged, onTap, etc. Will it over complicate the simple API in Polaris?
I'm looking into two ways of doing this, interface with a bunch of callbacks inside. Or persist mMyLocationOverlay object in PolarisMapView then add a method to return the object for others to use it on their own.
Do you have any suggestion? I'm unsure if the latter way would introduce any leak if someone did not handle it properly?
I don't think replicating the MyLocationOverlay's API in PolarisMapView is a great option. When I released Polaris, I removed two methods that was here at the beginning. I still have to think about the consequences but I think having a factory to create a MyLocationOverlay or simply exposing it is a good option.
I couldn't find a way to get the location of MyLocationOverlay marker. For the time being, I hacked this into PolarisMapView. Not sure if this is omitted on purpose but since PolarisMapView wraps MyLocationOverlay into it so I think adding this will simplify the usage a little bit. Or should we rely on LocationListener instead?
The text was updated successfully, but these errors were encountered: