Beispiel #1
0
LRESULT CRhoMapViewDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {
	if (ourMapView != NULL) {
		rho_map_destroy(ourMapView);
		ourMapView = NULL;
	}

    if ( m_hBrush ) 
        DeleteObject(m_hBrush);
    if ( m_hMemBitmap ) 
        DeleteObject(m_hMemBitmap);

    m_hBrush = 0;
    m_hMemBitmap = 0;

	return 0;
}
Beispiel #2
0
RHO_GLOBAL void mapview_close()
{
    if (ourIsOldGoogleEngineUsed) {
        google_mapview_close();
    }
    else {
		if (s_mapdevice)
		{
			rhomap::IMapView *mv = s_mapdevice->mapView();
			rho_map_destroy(mv);
		}
		delete s_mapdevice;
		s_mapdevice = NULL;

	JNIEnv *env = jnienv();
    	jclass cls = getJNIClass(RHODES_JAVA_CLASS_MAPVIEW);
    	if (!cls) return;
    	jmethodID mid = getJNIClassStaticMethod(env, cls, "destroy", "()V");
    	if (!mid) return;
    	env->CallStaticVoidMethod(cls, mid);

	}
}