What is a map ?

derez

Expert
Licensed User
Longtime User
Working on a map module for B4R I started thinking why the map type is called map, and I think I got it !
There are several kinds of things that we call map: A geografic map, the map function and the type map.
Lets start with math (sorry) -
Mapping in math means transfer function of a vector from one space to another. An simple example is the conversion from Celsius degrees to Farenheit degrees. We can take the range from 0 to 100 degrees in the Celsius one-dimesion-space and map it the Farenheit one-dimension-space 32 to 212 . This mapping is linear - the function's drawing on a two-dimension board is a straight line. As such - there is one point in F for each point in C and vice versa.
There are non liner mappings - like y = x^2 which has one y value for two points in x, attention should be paid !
The logic converter that is used a lot in B4R HW projects is a single point mapping - from 5v to 3.3v and vice versa.
A more complex example is the matrix. A p by q matrix is a transfer function between verctors of dimension p to vectors of dimension q, each in its own multi-dimension space.
The Geo map is similar to this. Where the map is of a small area, the paper map (my generation) or device's map (your generation) is a linear transfer function between the actual area to the geo map. The real world maps are more complicated because the area to be transfered is not flat but a part of a sphere, so the area must be projected first to a flat area (there are many ways to do it).
Last - the type map which we are so familiar with as SW developers. Unlike the continuous functions mentioned above, this is a digital mapping - one point by one point and their separate values. The spaces are usually from string space (key) to a specific type like string or general like object.
Conclusion: Google map, Thermometer's scale, B4X map are all the same - just maps...
 
Top