MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / OnZoomToLayer

Method OnZoomToLayer

Explore/MapLayerTree.cpp:576–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

574}
575
576void MapTree::OnZoomToLayer(wxCommandEvent& event)
577{
578 // set map extent to selected layer
579 wxString map_name = map_titles[new_order[select_id]];
580 BackgroundMapLayer* ml = GetMapLayer(map_name);
581 double minx, miny, maxx, maxy;
582 if (ml == NULL) {
583 // selected layer is current map
584 canvas->GetExtent(minx, miny, maxx, maxy);
585 } else {
586 // other layer
587 ml->GetExtent(minx, miny, maxx, maxy);
588 }
589 canvas->ExtentTo(minx, miny, maxx, maxy);
590 canvas->RedrawMap();
591}
592
593void MapTree::OnZoomToSelected(wxCommandEvent& event)
594{

Callers

nothing calls this directly

Calls 3

ExtentToMethod · 0.80
RedrawMapMethod · 0.80
GetExtentMethod · 0.45

Tested by

no test coverage detected