Ejemplo n.º 1
0
        public void VectorTile_Query()
        {
            VectorTile v = new VectorTile(9, 112, 195);

            byte[] bytes = File.ReadAllBytes(@".\data\9.112.195.pbf");
            v.SetData(bytes);
            IEnumerable <VectorQueryResult> results = v.Query(-100.8576, 39.1181);
            VectorQueryResult result = results.ToList()[0];

            Assert.AreEqual("world", result.Layer);
            Assert.AreEqual(0, result.Distance);
            Assert.AreEqual(207, result.Feature.Id());
            IDictionary <string, object> attributes = result.Feature.Attributes();

            Assert.AreEqual("United States", (string)attributes["NAME"]);
        }
Ejemplo n.º 2
0
 public void VectorTile_Query()
 {
     VectorTile v = new VectorTile(9, 112, 195);
     byte[] bytes = File.ReadAllBytes(@".\data\9.112.195.pbf");
     v.SetData(bytes);
     IEnumerable<VectorQueryResult> results = v.Query(-100.8576, 39.1181);
     VectorQueryResult result = results.ToList()[0];
     Assert.AreEqual("world", result.Layer);
     Assert.AreEqual(0, result.Distance);
     Assert.AreEqual(207, result.Feature.Id());
     IDictionary<string, object> attributes = result.Feature.Attributes();
     Assert.AreEqual("United States", (string)attributes["NAME"]);
 }