private void TestPOIdataOverlay() { // Markers for POI item int markerId = NMapPOIflagType.PIN; // set POI data NMapPOIdata poiData = new NMapPOIdata(2, mMapViewerResourceProvider); poiData.BeginPOIdata(2); NMapPOIitem item = poiData.AddPOIitem(127.0630205, 37.5091300, "Pizza 777-111", markerId, 0); item.SetRightAccessory(true, NMapPOIflagType.CLICKABLE_ARROW); poiData.AddPOIitem(127.061, 37.51, "Pizza 123-456", markerId, 0); poiData.EndPOIdata(); // create POI data overlay NMapPOIdataOverlay poiDataOverlay = mOverlayManager.CreatePOIdataOverlay(poiData, null); // set event listener to the overlay //poiDataOverlay.OnStateChangeListener = onPOIdataStateChangeListener; poiDataOverlay.CalloutClick += OnCalloutClick; poiDataOverlay.FocusChanged += OnFocusChanged; // select an item poiDataOverlay.SelectPOIitem(0, true); // show all POI data //poiDataOverlay.showAllPOIdata(0); }
private void TestFloatingPOIdataOverlay() { // Markers for POI item int marker1 = NMapPOIflagType.PIN; // set POI data NMapPOIdata poiData = new NMapPOIdata(1, mMapViewerResourceProvider); poiData.BeginPOIdata(1); NMapPOIitem item = poiData.AddPOIitem(null, "Touch & Drag to Move", marker1, 0); if (item != null) { // initialize location to the center of the map view. item.Point = mMapController.MapCenter; // set floating mode item.FloatingMode = NMapPOIitem.FloatingTouch | NMapPOIitem.FloatingDrag; // show right button on callout item.SetRightButton(true); mFloatingPOIitem = item; } poiData.EndPOIdata(); // create POI data overlay NMapPOIdataOverlay poiDataOverlay = mOverlayManager.CreatePOIdataOverlay(poiData, null); if (poiDataOverlay != null) { //poiDataOverlay.SetOnFloatingItemChangeListener(onPOIdataFloatingItemChangeListener); poiDataOverlay.FloatingItemChange += onPointChanged; // set event listener to the overlay //poiDataOverlay.OnStateChangeListener = onPOIdataStateChangeListener; poiDataOverlay.CalloutClick += OnCalloutClick; poiDataOverlay.FocusChanged += OnFocusChanged; poiDataOverlay.SelectPOIitem(0, false); mFloatingPOIdataOverlay = poiDataOverlay; } }
private void TestPathPOIdataOverlay() { // set POI data NMapPOIdata poiData = new NMapPOIdata(4, mMapViewerResourceProvider, true); poiData.BeginPOIdata(4); poiData.AddPOIitem(349652983, 149297368, "Pizza 124-456", NMapPOIflagType.FROM, null); poiData.AddPOIitem(349652966, 149296906, null, NMapPOIflagType.NUMBER_BASE + 1, null); poiData.AddPOIitem(349651062, 149296913, null, NMapPOIflagType.NUMBER_BASE + 999, null); poiData.AddPOIitem(349651376, 149297750, "Pizza 000-999", NMapPOIflagType.TO, null); poiData.EndPOIdata(); // create POI data overlay NMapPOIdataOverlay poiDataOverlay = mOverlayManager.CreatePOIdataOverlay(poiData, null); // set event listener to the overlay //poiDataOverlay.OnStateChangeListener = onPOIdataStateChangeListener; poiDataOverlay.CalloutClick += OnCalloutClick; poiDataOverlay.FocusChanged += OnFocusChanged; }