public void OnElementLoadedHandler(int tag, long id, string[] tags, int tagCount, double[] vertices, int vertexCount, string[] styles, int styleCount) { Element element = MapDataAdapter.AdaptElement(id, tags, vertices, styles); foreach (var observer in _observers) { observer.OnNext(element); } }
private static void OnElementFoundHandler(int tag, long id, IntPtr tagPtr, int tagCount, IntPtr vertexPtr, int vertexCount, IntPtr stylePtr, int styleCount) { // NOTE see note above var vertices = MarshalUtils.ReadDoubles(vertexPtr, vertexCount); var tags = MarshalUtils.ReadStrings(tagPtr, tagCount); var styles = MarshalUtils.ReadStrings(stylePtr, styleCount); Element element = MapDataAdapter.AdaptElement(id, tags, vertices, styles); foreach (var observer in _queryObservers) { observer.OnNext(element); } }
private static void OnElementLoadedHandler(int tag, long id, IntPtr tagPtr, int tagCount, IntPtr vertexPtr, int vertexCount, IntPtr stylePtr, int styleCount) { Tile tile; if (!Tiles.TryGetValue(tag, out tile) || tile.IsDisposed) { return; } // NOTE see note above var vertices = MarshalUtils.ReadDoubles(vertexPtr, vertexCount); var tags = MarshalUtils.ReadStrings(tagPtr, tagCount); var styles = MarshalUtils.ReadStrings(stylePtr, styleCount); MapDataAdapter.AdaptElement(tile, _sMaterialProvider, _observers, _trace, id, vertices, tags, styles); }
public void OnElementLoadedHandler(int tag, long id, string[] tags, int tagCount, double[] vertices, int vertexCount, string[] styles, int styleCount) { MapDataAdapter.AdaptElement(_tile, _materialProvider, _observers, _trace, id, vertices, tags, styles); }