Questions tagged [maps]

A map is a visual representation of an area—a symbolic depiction highlighting relationships between elements of that space such as objects, regions, and themes. For the key-value data structure, use dictionary tag instead.

Modern maps

Many maps are static two-dimensional, geometrically accurate (or approximately accurate) representations of three-dimensional space, while others are dynamic or interactive, even three-dimensional.

Although most commonly used to depict geography, maps may represent any space, real or imagined, without regard to context or scale; e.g. brain mapping, DNA mapping, and extraterrestrial mapping.

Many, but not all, maps are drawn to a scale, expressed as a ratio such as 1:10,000, meaning that 1 of any unit of measurement on the map corresponds exactly, or approximately, to 10,000 of that same unit on the ground.

Maps of the world or large areas are often either 'political' or 'physical'. Topographic maps show elevations and relief with contour lines or shading. Geological maps show not only the physical surface, but characteristics of the underlying rock, fault lines, and subsurface structures.

Maps that depict the surface of the Earth also use a projection, a way of translating the three-dimensional real surface of the geoid to a two-dimensional picture. Perhaps the best-known world-map projection is the Mercator projection, originally designed as a form of nautical chart.

Aeroplane pilots use aeronautical charts based on a Lambert conformal conic projection, in which a cone is laid over the section of the earth to be mapped.

From the last quarter of the 20th century, the indispensable tool of the cartographer has been the computer. Much of cartography, especially at the data-gathering survey level, has been subsumed by Geographic Information Systems (GIS).

A complex problem when dealing with maps is to calculate the distance between two points. The simplest approach is to work as if the map was a simple plane and use Euclidean distance function. However, this might be inadequate, especially in the case when we are dealing with large distances. In that case the differences between the real shape of the planet and a plane will get more accent. A significant improvement over this is to calculate the distance between two coordinates using the Haversine formula, but even this might be imprecise in some cases where high precision is needed, due to the differences of altitude or other geometrical, or non-geometrical distance modificators, like speed limits on roads, closed borders of countries, travel costs, etc.

More info on Wikipedia

9449 questions
41
votes
17 answers

Setting max zoom level in google maps android api v2

I'm currently working on developing apps by using Google maps android API v2. My code is as follows. Suppose map has several markers and zoom up to show all markers in display. LatLngBuilder.Builder builder = LatLngBounds.builder(); for(Marker m :…
user2223820
  • 583
  • 1
  • 5
  • 12
40
votes
7 answers

custom marker icon with react-leaflet

I tried everything I found on the web, Stackoverflow and Github, and I still can't make it. I want to make a custom marker with a custom icon, but with my code below I always got an error : 'TypeError: options.icon.createIcon is not a function' Here…
arnaudambro
  • 2,403
  • 3
  • 25
  • 51
39
votes
7 answers

Android Maps Point Clustering

Is there any code for Point Clustering in android? How can i load thousand pinpoint without having performance issues?
weakwire
  • 9,284
  • 8
  • 53
  • 78
39
votes
3 answers

How to put a geom_sf produced map on top of a ggmap produced raster

I tried the following code: library(ggplot2) library(ggmap) library(sf) nc <- st_read(system.file("shape/nc.shp", package = "sf")) str(nc) Classes ‘sf’ and 'data.frame': 100 obs. of 15 variables: $ AREA : num 0.114 0.061 0.143 0.07 0.153…
user1453488
  • 441
  • 1
  • 4
  • 4
38
votes
5 answers

error:InvalidValueError: setCenter: not a LatLng or LatLngLiteral: in property lat: not a number

function initAutocomplete() { var lat=document.getElementById('lat').value; var lng=document.getElementById('lng').value; console.log(lat); console.log(lng); var map = new google.maps.Map(document.getElementById('map'), { …
ravneet
  • 471
  • 2
  • 5
  • 11
38
votes
16 answers

Pulling values from a Java Properties file in order?

I have a properties file where the order of the values is important. I want to be able to iterate through the properties file and output the values based on the order of the original file. However, since the Properties file is backed by, correct me…
James McMahon
  • 48,506
  • 64
  • 207
  • 283
37
votes
4 answers

Plot coordinates on map

I am trying to plot my coordinates using R. I have tried already to follow different post (R: Plot grouped coordinates on world map ; Plotting coordinates of multiple points at google map in R) but I am not having much success with my data. I am…
flacchy
  • 511
  • 1
  • 6
  • 9
37
votes
2 answers

Move google map center javascript api

In my project I want to move the center of the map to new coordinates. This is the code I have for the map function initialize() { var mapOptions = { center: new google.maps.LatLng(0, 0), zoom: 4, mapTypeId:…
taormania
  • 661
  • 2
  • 9
  • 17
36
votes
7 answers

midpoint between two latitude and longitude

I am trying to convert the code snippet given in this http://www.movable-type.co.uk/scripts/latlong.html into java. But I am not getting same result as that of site. Here is my code to find the midpoint between two points where their latitudes and…
CrazyCoder
  • 2,465
  • 8
  • 36
  • 57
36
votes
7 answers

Golang: convert slices into map

Is there an easy/simple means of converting a slice into a map in Golang? Like converting an array into hash in perl is easy to do with simple assignment like %hash = @array this above will convert all the elements in the array into a hash, with…
Nikhil Mulley
  • 694
  • 1
  • 5
  • 14
36
votes
6 answers

Open alternatives to Google-maps?

I'm looking for an alternative to Google-maps with all the richness of their API but more open. Does such a thing exist?
Skizit
  • 43,506
  • 91
  • 209
  • 269
36
votes
1 answer

multiple markers google maps embed API

I need to place several markers which specified by coordinates on embed map. I know how to do it for one marker, but don't know for multiple.