Esempio n. 1
0
void CLayers::AddLayer(CLayer*ly)
{
	 layers.Add(ly);
	 DRect ex=ly->GetFullExtent();
	 if(layers.GetSize()==1)
	 {
		 FullExtent=ex;
		 CRect rt;
		 pMap->GetClientRect(rt);
		 pMap->GetMapPosition()->InitialMap(rt,ex);
		 if(pSpatialReference==NULL) pSpatialReference=ly->GetSpatialReference();
	 }
	 else
	 {
		 if(ly->IsVectorLayer())
		 {
			 CSpatialRefTrans psp;
			 ex=psp.TransformRect(ly->GetSpatialReference(),GetSpatialReference(),ex);
		 }
		 FullExtent=FullExtent+ex;
	 }
}
Esempio n. 2
0
void wxGxPrjFileUI::EditProperties(wxWindow *parent)
{
    wxPropertySheetDialog PropertySheetDialog;
    if (!PropertySheetDialog.Create(parent, wxID_ANY, _("Properties"), wxDefaultPosition, wxSize( 480,640 ), wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER))
        return;
    PropertySheetDialog.SetIcon(properties_xpm);
    PropertySheetDialog.CreateButtons(wxOK);
    wxWindow* pParentWnd = static_cast<wxWindow*>(PropertySheetDialog.GetBookCtrl());

    wxGISSpatialReferencePropertyPage* SpatialReferencePropertyPage = new wxGISSpatialReferencePropertyPage(GetSpatialReference(), pParentWnd);
    PropertySheetDialog.GetBookCtrl()->AddPage(SpatialReferencePropertyPage, SpatialReferencePropertyPage->GetPageName());

    //PropertySheetDialog.LayoutDialog();
    PropertySheetDialog.SetSize(480,640);
    PropertySheetDialog.Center();

    PropertySheetDialog.ShowModal();
}