public void LoadFloorMapDetails(int mid, FloorMapDetails map)
        {
            if (!m_MapLayers.ContainsKey(mid))
            {
                m_MapLayers.Add(mid, new MapLayer());
            }

            if (!m_MapWaypoints.ContainsKey(mid))
            {
                m_MapWaypoints.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapWaypoints[mid]);
            }

            if (!m_MapPointsOfInterest.ContainsKey(mid))
            {
                m_MapPointsOfInterest.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapPointsOfInterest[mid]);
            }

            if (!m_MapVistas.ContainsKey(mid))
            {
                m_MapVistas.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapVistas[mid]);
            }

            if (!m_MapDungeons.ContainsKey(mid))
            {
                m_MapDungeons.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapDungeons[mid]);
            }

            if (!m_MapRenownHearts.ContainsKey(mid))
            {
                m_MapRenownHearts.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapRenownHearts[mid]);
            }

            if (!m_MapSkillPoints.ContainsKey(mid))
            {
                m_MapSkillPoints.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapSkillPoints[mid]);
            }

            if (!m_MapSectors.ContainsKey(mid))
            {
                m_MapSectors.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapSectors[mid]);
            }

            m_MapWaypoints[mid].Children.Clear();
            m_MapPointsOfInterest[mid].Children.Clear();
            m_MapVistas[mid].Children.Clear();
            m_MapDungeons[mid].Children.Clear();
            m_MapRenownHearts[mid].Children.Clear();
            m_MapSkillPoints[mid].Children.Clear();
            m_MapSectors[mid].Children.Clear();

            foreach (PointOfInterest poi in map.PointsOfInterest)
            {
                Pushpin poiPin = new PointOfInterestPushpin(poi);

                poiPin.Location = ArenaNetMap.Unproject(new Point(poi.Coord[0], poi.Coord[1]), ArenaNetMap.MaxZoomLevel);

                switch (poi.TypeEnum)
                {
                case PointOfInterestType.Waypoint:
                    m_MapWaypoints[mid].Children.Add(poiPin);
                    break;

                case PointOfInterestType.Landmark:
                    m_MapPointsOfInterest[mid].Children.Add(poiPin);
                    break;

                case PointOfInterestType.Vista:
                    m_MapVistas[mid].Children.Add(poiPin);
                    break;

                case PointOfInterestType.Unlock:
                    m_MapDungeons[mid].Children.Add(poiPin);
                    break;

                default:
                    continue;
                }
            }

            foreach (Task rh in map.Tasks)
            {
                Pushpin rhPin = new TaskPushpin(rh);

                rhPin.Location = ArenaNetMap.Unproject(new Point(rh.Coord[0], rh.Coord[1]), ArenaNetMap.MaxZoomLevel);

                m_MapRenownHearts[mid].Children.Add(rhPin);
            }

            foreach (MappedModel sp in map.SkillChallenges)
            {
                Pushpin spPin = new SkillChallengePushpin(sp);

                spPin.Location = ArenaNetMap.Unproject(new Point(sp.Coord[0], sp.Coord[1]), ArenaNetMap.MaxZoomLevel);

                m_MapSkillPoints[mid].Children.Add(spPin);
            }

            // hide sectors by default
            m_MapSectors[mid].Visibility = Visibility.Collapsed;
            foreach (Sector s in map.Sectors)
            {
                Pushpin sPin = new SectorPushpin(s);

                sPin.Location = ArenaNetMap.Unproject(new Point(s.Coord[0], s.Coord[1]), ArenaNetMap.MaxZoomLevel);

                m_MapSectors[mid].Children.Add(sPin);
            }
        }
        public void LoadFloorMapDetails(int mid, FloorMapDetails map)
        {
            if (!m_MapLayers.ContainsKey(mid))
            {
                m_MapLayers.Add(mid, new MapLayer());
            }

            if (!m_MapWaypoints.ContainsKey(mid))
            {
                m_MapWaypoints.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapWaypoints[mid]);
            }

            if (!m_MapPointsOfInterest.ContainsKey(mid))
            {
                m_MapPointsOfInterest.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapPointsOfInterest[mid]);
            }

            if (!m_MapVistas.ContainsKey(mid))
            {
                m_MapVistas.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapVistas[mid]);
            }

            if (!m_MapDungeons.ContainsKey(mid))
            {
                m_MapDungeons.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapDungeons[mid]);
            }

            if (!m_MapRenownHearts.ContainsKey(mid))
            {
                m_MapRenownHearts.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapRenownHearts[mid]);
            }

            if (!m_MapSkillPoints.ContainsKey(mid))
            {
                m_MapSkillPoints.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapSkillPoints[mid]);
            }

            if (!m_MapSectors.ContainsKey(mid))
            {
                m_MapSectors.Add(mid, new MapLayer());
                m_MapLayers[mid].Children.Add(m_MapSectors[mid]);
            }

            m_MapWaypoints[mid].Children.Clear();
            m_MapPointsOfInterest[mid].Children.Clear();
            m_MapVistas[mid].Children.Clear();
            m_MapDungeons[mid].Children.Clear();
            m_MapRenownHearts[mid].Children.Clear();
            m_MapSkillPoints[mid].Children.Clear();
            m_MapSectors[mid].Children.Clear();

            foreach (PointOfInterest poi in map.PointsOfInterest)
            {
                Pushpin poiPin = new PointOfInterestPushpin(poi);

                poiPin.Location = ArenaNetMap.Unproject(new Point(poi.Coord[0], poi.Coord[1]), ArenaNetMap.MaxZoomLevel);

                switch (poi.TypeEnum)
                {
                    case PointOfInterestType.Waypoint:
                        m_MapWaypoints[mid].Children.Add(poiPin);
                        break;
                    case PointOfInterestType.Landmark:
                        m_MapPointsOfInterest[mid].Children.Add(poiPin);
                        break;
                    case PointOfInterestType.Vista:
                        m_MapVistas[mid].Children.Add(poiPin);
                        break;
                    case PointOfInterestType.Unlock:
                        m_MapDungeons[mid].Children.Add(poiPin);
                        break;
                    default:
                        continue;
                }
            }

            foreach (Task rh in map.Tasks)
            {
                Pushpin rhPin = new TaskPushpin(rh);

                rhPin.Location = ArenaNetMap.Unproject(new Point(rh.Coord[0], rh.Coord[1]), ArenaNetMap.MaxZoomLevel);

                m_MapRenownHearts[mid].Children.Add(rhPin);
            }

            foreach (MappedModel sp in map.SkillChallenges)
            {
                Pushpin spPin = new SkillChallengePushpin(sp);

                spPin.Location = ArenaNetMap.Unproject(new Point(sp.Coord[0], sp.Coord[1]), ArenaNetMap.MaxZoomLevel);

                m_MapSkillPoints[mid].Children.Add(spPin);
            }

            // hide sectors by default
            m_MapSectors[mid].Visibility = Visibility.Collapsed;
            foreach (Sector s in map.Sectors)
            {
                Pushpin sPin = new SectorPushpin(s);

                sPin.Location = ArenaNetMap.Unproject(new Point(s.Coord[0], s.Coord[1]), ArenaNetMap.MaxZoomLevel);

                m_MapSectors[mid].Children.Add(sPin);
            }
        }