MCPcopy Create free account
hub / github.com/comaps/comaps / CreateNote

Method CreateNote

libs/map/framework.cpp:3177–3193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3175}
3176
3177void Framework::CreateNote(osm::MapObject const & mapObject, osm::Editor::NoteProblemType const type,
3178 string const & note)
3179{
3180 ms::LatLon latLon;
3181 if (HasPlacePageInfo())
3182 latLon = mercator::ToLatLon(GetCurrentPlacePageInfo().GetMercator());
3183 else
3184 {
3185 LOG(LWARNING, ("Could not get selected map point, falling back to mapObject location"));
3186 latLon = mapObject.GetLatLon();
3187 }
3188
3189 osm::Editor::Instance().CreateNote(latLon, mapObject.GetID(), mapObject.GetTypes(), mapObject.GetDefaultName(), type,
3190 note);
3191 if (type == osm::Editor::NoteProblemType::PlaceDoesNotExist)
3192 DeactivateMapSelection();
3193}
3194
3195void Framework::RunUITask(function<void()> fn)
3196{

Calls 5

GetDefaultNameMethod · 0.80
ToLatLonFunction · 0.50
GetLatLonMethod · 0.45
GetIDMethod · 0.45
GetTypesMethod · 0.45

Tested by

no test coverage detected