Exemple #1
0
    //****************************************************************************************************
    //
    //****************************************************************************************************

    public override bool AcceptDrop(IDragDrop drop)
    {
        if (drop is WebMapObjectBase)
        {
            WebMapObjectBase mapObject = drop as WebMapObjectBase;

            Localizable localizable = CreateMapObjectLocalizable((drop is WebMapFlag) ? OBJECT_TYPE.FLAG : OBJECT_TYPE.PIN);

            if (localizable != null)
            {
                localizable.m_coord.latitude = GetLatitudeFrom3DCoord(mapObject.transform.position);

                localizable.m_coord.longitude = GetLongitudeFrom3DCoord(mapObject.transform.position);

                localizable.m_coord.altitude = 0.0f;

                localizable.DBPush();
            }

            DeleteMapObject(mapObject);

            return(true);
        }

        return(false);
    }