public RenderRegion(MashupParseContext context, DirtyEvent parentDirty, CoordinateSystemIfc coordSys) { dirtyEvent = new DirtyEvent(parentDirty); XMLTagReader xMLTagReader = context.NewTagReader("RenderRegion"); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(LatLon.GetXMLTag())) { vertexList.Add(new LatLon(context, coordSys)); } } }
public LatLonZoom(MashupParseContext context, CoordinateSystemIfc coordSys) { XMLTagReader xMLTagReader = context.NewTagReader("LatLonZoom"); try { if (context.reader.GetAttribute("zoom") == null) { throw new InvalidLLZ(context, "Missing zoom attribute"); } try { _zoom = coordSys.GetZoomRange() .ParseAllowUndefinedZoom(context, "zoom", context.reader.GetAttribute("zoom")); } catch (InvalidMashupFile invalidMashupFile) { throw new InvalidLLZ(context, invalidMashupFile.Message); } bool flag = false; _latlon = default(LatLon); while (xMLTagReader.FindNextStartTag()) { if (xMLTagReader.TagIs(LatLon.GetXMLTag())) { _latlon = new LatLon(context, coordSys); flag = true; } } if (!flag) { throw new InvalidLLZ(context, "Missing LatLong Tag"); } } finally { xMLTagReader.SkipAllSubTags(); } }
public MapRectangle(MashupParseContext context, CoordinateSystemIfc coordSys) { XMLTagReader reader = context.NewTagReader("MapRectangle"); List <LatLon> list = new List <LatLon>(); while (reader.FindNextStartTag()) { if (reader.TagIs(LatLon.GetXMLTag())) { list.Add(new LatLon(context, coordSys)); } } reader.SkipAllSubTags(); if (list.Count != 2) { throw new InvalidMashupFile(context, string.Format("{0} should contain exactly 2 {1} subtags", "MapRectangle", LatLon.GetXMLTag())); } this.ll0 = list[0]; this.ll1 = list[1]; this.AssertOrder(); }