Mapbox-gl-js: Rename "ElementMarker" to "Marker", ensure terminology is used accurately in docs

Created on 30 Jun 2016  路  5Comments  路  Source: mapbox/mapbox-gl-js

  • Markers are HTML elements fixed to a geographic coordinate on the map. Markers are styled and made interactive with the full power of HTML, CSS, and Javascript. Users should be able to work with about a hundred markers on a map.
  • Symbol layers are small icons & text drawn within WebGL fixed to a geographic coordinate on the map. Symbols are styled and made interactive with the GL style spec and GL JS APIs. Users should be able to work with many thousands of symbols on a map.
  • [x] rename ElementMarker to Marker in the codebase
  • [x] ensure all references to "markers" in GL JS API docs are accurate
  • [x] ensure all references to "markers" in GL JS examples are accurate
  • [x] ensure all references to "markers" in /help docs are accurate

cc @mourner @jfirebaugh @lyzidiamond @samanpwbb @tristen @1ec5

Most helpful comment

We should use "point" to refer to a geometric type or instance of that type, _independent of the implementation used to render it_. We should use "marker" and "symbol layer" as @lucaswoj defined them above.

So:

  • "Rendering GeoJSON Points using Markers"
  • "Rendering GeoJSON Points using a symbol layer"

I disagree with choosing ElementMarker or Point over Marker. Marker is what most people are looking for, and they will not be surprised by the name or what it does. Adding Element to it does not significantly enhance the clarity. (We wouldn't rename Popup to ElementPopup.)

All 5 comments

I really feel like we should not change ElementMarker to Marker and I haven't heard a compelling argument why it should be changed. Marker is classically generic to web maps, referring to dots on a map by any number of implementations. I feel like this is a step back from trying to indoctrinate Point as the word used.

My vote is for the following:

  • Stick with ElementMarker or DOMMarker. This makes it explicit that the browser renders them and can be manipulated by Front-end languages. It also makes it easier to point out their performance limitations. Leaflet's DivIcon is a good example of this being very clear in the name and how it's implemented.
  • Rename examples that even mention the work "markers" to "points". This was just a mistake to begin with: https://github.com/mapbox/mapbox-gl-js/issues/2241

We should use "point" to refer to a geometric type or instance of that type, _independent of the implementation used to render it_. We should use "marker" and "symbol layer" as @lucaswoj defined them above.

So:

  • "Rendering GeoJSON Points using Markers"
  • "Rendering GeoJSON Points using a symbol layer"

I disagree with choosing ElementMarker or Point over Marker. Marker is what most people are looking for, and they will not be surprised by the name or what it does. Adding Element to it does not significantly enhance the clarity. (We wouldn't rename Popup to ElementPopup.)

While there are two ways to make lower-case-m markers, most users will find upper-case-m Markers meet their expectations better. I feel good about nudging people towards Markers and clearly communicating that symbol layers are a more performant alternative.

I feel good about nudging people towards Markers and clearly communicating that symbol layers are a more performant alternative.

Have we benchmarked this? It would be great to be able to say "Symbol Layers are xx% faster" or "allow you to display xx% more markers".

This is done now 馃帀

Was this page helpful?
0 / 5 - 0 ratings