コード例 #1
0
 const std::string MyPinsWebService::CreatePinPostData(const MyPinModel& pinModel)
 {
     std::string json = "";
     if(pinModel.IsInterior())
     {
         json = "{\n  \"title\":\"" + pinModel.GetTitle()
         + "\",\n  \"subtitle\":\"\",\n  \"tags\":\"office business\",\n  \"lat\":\"" + ConvertModelDetailToString(pinModel.GetLatLong().GetLatitudeInDegrees())
         + "\",\n  \"lon\":\"" + ConvertModelDetailToString(pinModel.GetLatLong().GetLongitudeInDegrees())
         + "\",\n  \"indoor\":\"" + BoolToString(pinModel.IsInterior())
         + "\",\n  \"indoor_id\":\"" + pinModel.GetBuildingId().Value()
         + "\",\n  \"floor_id\":\"" + ConvertModelDetailToString(pinModel.GetFloor())
         + "\",\n \"user_data\":{\"description\":\"" + pinModel.GetDescription() + "\"}}";
     }
     else
     {
         json = "{\n  \"title\":\"" + pinModel.GetTitle()
         + "\",\n  \"subtitle\":\"\",\n  \"tags\":\"office business\",\n  \"lat\":\"" + ConvertModelDetailToString(pinModel.GetLatLong().GetLatitudeInDegrees())
         + "\",\n  \"lon\":\"" + ConvertModelDetailToString(pinModel.GetLatLong().GetLongitudeInDegrees())
         + "\",\n \"user_data\":{\"description\":\"" + pinModel.GetDescription() + "\"}}";
     }
     return json;
 }
コード例 #2
0
            void MyPinAddedToMenuObserver::OnMyPinAddedToMenuMessage(const MyPinAddedToMenuMessage& message)
            {
                const std::string& myPinIcon(message.GetMyPinIcon());

                m_menuOptionsModel.AddItem(ConvertModelDetailToString(message.GetMyPinId()),
                                           message.GetMyPinTitle(),
                                           "",
                                           myPinIcon,
                                           MyPinMenuOptionFactory::CreateMyPinMenuOption(message.GetMyPinId(),
                                                                      message.GetMyPinLocation(),
                                                                      message.GetMyPinInteriorId(),
                                                                      message.GetMyPinFloorIndex(),
                                                                      m_menuViewModel,
                                                                      m_messageBus,
                                                                      m_menuReaction,
                                                                      m_ignoredMenuReaction));
            }