internal virtual void displaySearchResults(Java.Lang.Object[] objects)
        {
            GLMapMarkerStyleCollection style = new GLMapMarkerStyleCollection();

            style.AddStyle(new GLMapMarkerImage("marker", mapView.ImageManager.Open("cluster.svgpb", 0.2f, unchecked ((int)0xFFFF0000))));
            style.SetDataCallback(new GLMapMarkerStyleCollectionDataCallbackAnonymousInnerClassHelper(this));
            GLMapMarkerLayer layer = new GLMapMarkerLayer(objects, style);

            layer.SetClusteringEnabled(false);
            mapView.DisplayMarkerLayer(layer);

            //Zoom to results
            if (objects.Length != 0)
            {
                //Calculate bbox
                GLMapBBox bbox = new GLMapBBox();
                foreach (object @object in objects)
                {
                    if (@object is GLMapVectorObject)
                    {
                        bbox.AddPoint(((GLMapVectorObject)@object).Point());
                    }
                }
                //Zoom to bbox
                mapView.SetMapCenter(bbox.Center(), false);
                mapView.SetMapZoom(mapView.MapZoomForBBox(bbox, mapView.Width, mapView.Height), false);
            }
        }
 public override void FillData(Java.Lang.Object marker, long nativeMarker)
 {
     if (marker is GLMapVectorObject)
     {
         GLMapVectorObject obj = (GLMapVectorObject)marker;
         GLMapMarkerStyleCollection.SetMarkerLocationFromVectorObject(nativeMarker, obj);
     }
     GLMapMarkerStyleCollection.SetMarkerStyle(nativeMarker, 0);
 }
 public override void FillUnionData(int markersCount, long nativeMarker)
 {
     for (int i = unionCounts.Length - 1; i >= 0; i--)
     {
         if (markersCount > unionCounts[i])
         {
             GLMapMarkerStyleCollection.SetMarkerStyle(nativeMarker, i);
             break;
         }
     }
     GLMapMarkerStyleCollection.SetMarkerText(nativeMarker, Convert.ToString(markersCount), new Point(0, 0), textStyle);
 }
        internal virtual void addMarkersWithMapcss()
        {
            GLMapMarkerStyleCollection styleCollection = new GLMapMarkerStyleCollection();

            for (int i = 0; i < unionColours.Length; i++)
            {
                float scale = (float)(0.2 + 0.1 * i);
                int   index = styleCollection.AddStyle(new GLMapMarkerImage("marker" + scale, mapView.ImageManager.Open("cluster.svgpb", scale, unionColours[i])));
                styleCollection.SetStyleName(i, "uni" + index);
            }

            GLMapVectorCascadeStyle style = GLMapVectorCascadeStyle.CreateStyle("node{icon-image:\"uni0\"; text:eval(tag(\"name\")); text-color:#2E2D2B; font-size:12; font-stroke-width:1pt; font-stroke-color:#FFFFFFEE;}" + "node[count>=2]{icon-image:\"uni1\"; text:eval(tag(\"count\"));}" + "node[count>=4]{icon-image:\"uni2\";}" + "node[count>=8]{icon-image:\"uni3\";}" + "node[count>=16]{icon-image:\"uni4\";}" + "node[count>=32]{icon-image:\"uni5\";}" + "node[count>=64]{icon-image:\"uni6\";}" + "node[count>=128]{icon-image:\"uni7\";}");

            new AsyncTaskAnonymousInnerClassHelper(this, styleCollection, style).Execute();
        }
        internal virtual void addMarkers()
        {
            GLMapMarkerStyleCollection style = new GLMapMarkerStyleCollection();

            int[] unionCounts = new int[] { 1, 2, 4, 8, 16, 32, 64, 128 };
            for (int i = 0; i < unionCounts.Length; i++)
            {
                float scale = (float)(0.2 + 0.1 * i);
                style.AddStyle(new GLMapMarkerImage("marker" + scale, mapView.ImageManager.Open("cluster.svgpb", scale, unionColours[i])));
            }

            GLMapVectorStyle textStyle = GLMapVectorStyle.CreateStyle("{text-color:black;font-size:12;font-stroke-width:1pt;font-stroke-color:#FFFFFFEE;}");

            style.SetDataCallback(new GLMapMarkerStyleCollectionDataCallbackAnonymousInnerClassHelper2(this, unionCounts, textStyle));

            new AsyncTaskAnonymousInnerClassHelper2(this, style).Execute();
        }
 public override void FillData(Java.Lang.Object marker, long nativeMarker)
 {
     if (marker is MapPoint)
     {
         GLMapMarkerStyleCollection.SetMarkerLocation(nativeMarker, (MapPoint)marker);
         GLMapMarkerStyleCollection.SetMarkerText(nativeMarker, "Test", new Point(0, 0), textStyle);
     }
     else if (marker is GLMapVectorObject)
     {
         GLMapVectorObject obj = (GLMapVectorObject)marker;
         GLMapMarkerStyleCollection.SetMarkerLocationFromVectorObject(nativeMarker, obj);
         string name = obj.ValueForKey("name");
         if (!string.ReferenceEquals(name, null))
         {
             GLMapMarkerStyleCollection.SetMarkerText(nativeMarker, name, new Point(0, 15 / 2), textStyle);
         }
     }
     GLMapMarkerStyleCollection.SetMarkerStyle(nativeMarker, 0);
 }
 public AsyncTaskAnonymousInnerClassHelper2(MapViewActivity outerInstance, GLMapMarkerStyleCollection style)
 {
     this.outerInstance = outerInstance;
     this.style         = style;
 }