public override void AddLayer(Layer layer, Variant attributes) { // Add the layer to the map view mapView.Layers.Add(layer); // Check if the layer has info window. In that case will add a custom UTF grid event listener to the layer. Variant infoWindow = attributes.GetObjectElement("infowindow"); if (infoWindow.Type == VariantType.VariantTypeObject) { TileLayer tileLayer = (TileLayer)layer; tileLayer.UTFGridEventListener = new MyUTFGridEventListener(vectorLayer, infoWindow); } }