- From: Rushforth, Peter (NRCan/RNCan) <peter.rushforth@canada.ca>
- Date: Tue, 20 Feb 2018 20:09:29 +0000
- To: Rob Smith <rob.smith@awayteam.co.uk>
- CC: "public-maps4html@w3.org" <public-maps4html@w3.org>
Hi Rob, My turn to apologize for being slow to respond. > I’m not sure I understand what you’re proposing. Please can you give an example? In Leaflet, for example, there are a couple of methods to create a circle. Each of these creates a leaflet "Layer" object, which can be added to a map with the Layer.addTo(map) method. If we think about how that could be done with map/layer support in HTML, I think the DOM is the natural API to target for extension. Perhaps something like the following: ... <!-- a map centred on Greenwich Observatory: --> <map class="mymap" zoom="15" lat="51.48" lon="0.0" width="640" height="480"> <layer src="base map mapml url"/> </map <script> var circleLayer = document.implementation.createMAPMLDocument(); // (I saw something like this for HTML documents on MDN. Something similar could be useful for MapML) // creates a new MapML document, for which you can set the properties via DOM calls, e.g. title circleLayer.title = "New Circle Layer"; // var f = circleLayer.createElement('feature'); // libraries like Leaflet or OpenLayers could supply geometry constructors f.geometry = new Circle( Parameters for a 10-metre radius circle around the Greenwich Observatory at 51.48N, 0.00E go here). 'coordinate serialization method goes here'(); // or alternatively even maybe a factory method on the geometry element? The SimpleFeatures model doesn't forbid it I guess. Would have to ask the experts at OGC... f.geometry = f.geometry.circle( Parameters for a 10-metre radius circle around the Greenwich Observatory at 51.48N, 0.00E go here ); circle.body.appendChild(f); //other manipulations for style, class etc // append the mapml document into the layer as content (no @src attribute required) document.querySelector('map.mymap').appendChild(document.createElement('layer').appendChild(lyr)); // circle appears on the map, and in the layer control </script> ... Hopefully this exercise in imagination helps?? People receiving this email are welcome to chime in... > As you’ve already added new ‘shape’ types, e.g. marker, perhaps you could also add new types which are identical to the geometry values, e.g. linestring, polygon, etc., some of which may be simple synonyms for pre-existing values, e.g. polygon and poly. The old values are still supported, and MapML users can choose whichever terminology they're more comfortable with. I currently think the proposal to extend the @shape keyword list is a mistake. I would prefer to not (ask browser developers to) tinker with code that has been running for 20 years unnecessarily. I think the new semantics should mostly go into <layer> and related APIs as sketched above. I mean I've already heard from a browser developer who said they are unlikely to extend <map> at all, and if they add geographic maps they would prefer to add a different element. So in that case why bother talking about the area element at all. For reasons best discussed in another (bikeshedding-but-not-really) thread, I think progressive enhancement (fallback / graceful degradation) is really important and the confusion of having a new element instead of extending and existing one of appropriate base semantics are important factors also. For example, if the platform wanted to add sorting and selection functionality to the <table> element, would a new "<stable>" element be more or less confusing (to users not to mention maintainers of browsers) than extending the existing <table> element with new attributes?. Cheers, Peter Peter Rushforth Technology Advisor Canada Centre for Mapping and Earth Observation / Earth Sciences Sector Natural Resources Canada / Government of Canada mailto:peter.rushforth@canada.ca / Tel: 613-759-7915 Conseiller technique Centre canadien de cartographie et d’observation de la Terre / Secteur des sciences de la Terre Ressources naturelles Canada / Gouvernement du Canada mailto:peter.rushforth@canada.ca / Tél: 613-759-7915
Received on Tuesday, 20 February 2018 20:09:57 UTC