How to make a custom map & populate it like OSM - leaflet

I want to make an OSM like map of GTA:San Andreas (already got a leaflet.js map set up) and draw roads, buildings, bridges, etc like on OSM but I have no idea where to start.
Is there a way to integrate iD editor & its database on my custom map?

Related

Adding an overlay to a google map

I made my own google map with historical information (of houses and people in the 50-s in Princenhage, The Netherlands):
https://www.google.com/maps/d/viewer?mid=174YNyi2hs_iVpoU0qLqOPq-YUxI&ll=51.57704585455824%2C4.737584814456795&z=18
Now I would like to add an aerial photograph of 1950 as an extra layer on this map so that my map looks as 'google earth in 1950'.
Is this possible and how to do this?
It is possible but you need to make a baseMap of your aerial photo. If you managed that you can use this example to add the basemap to your viewer:
https://github.com/rcknr/basemap-google-maps

Custom tiles yet geo accurate in LeafletJS

I'm interested in custom map tiles, and using advice from here and here, I've experimented with exactly that. For a prototype I did a very geeky map of the Star Trek Federation, with episode links moving you around the planets/systems etc.
While that's all fine and dandy for fantastical locations, I'd also be interested in using heavily stylised renditions of real world locations, yet still using real lat,lng points. So, for example, a bespoke, yet mostly geo accurate, map of London, chopped into tiles, but if you passed in lat,lng coords for Camden Tube (51.53911 -0.14235), you would move to that location.
Any ideas how you configure LeafletJS to do this, without going the route of using Google Maps with custom tiles?
If I understand correctly, you have 2 different applications:
Your Star Trek map, for which you are satisfied.
Stylised map of real world, for which you would like real lat,lng coordinates to be accurate?
Then your question is how to create your custom tiles, so that Leaflet shows the stylised view of London when passed the real London coordinates?
In that case, it would be probably just a matter of correctly numbering your tiles. Or the reverse, modifying the tile numbers used by Leaflet to build the tiles URL. For the latter solution, see Specifying Lat & Long for Leaflet TileLayer
I'm not quite sure what you mean by "mostly geo accurate". It sounds like you probably just want to generate your own map tiles from some kind of source like OpenStreetMap. In that case, TileMill (although kind of obsolete) is probably the easiest way to go.
There are basically three parts:
Generate some map tiles (eg TileMill)
Host them (eg TileStream)
Point Leaflet at them

Is there a way to highlight roads using leaflet?

I have a complete set of waypoints (beginning, end, every intersection) and I'd like to display this on a map. I don't want to use a routing service and it should be offline.
How can I draw polylines on a map so that they follow the curves of the road?
I'm using leaflet.
Could the data be extracted from a relational database(PostgreSQL) and then convert it into GeoJSON and display on the map by leaflet?
I can't use any paid services either.
Leaflet has a polyline object. MapBox has a nice example how to use it.
I think scai has given you a good example to practice.By the way you can also store the data in JSON format in PostgreSQL.Refer this documentation for more details.JSON Types

MapBox.js Place Names Zoom Level

I am creating an application using MapBox.js, I would like to display all place names at Zoom Level 13 in MapBox Streets but some place names only will display at Level 14. Does anyone know if it is possible to change this preset on MB Streets without having access to their Style Sheets?
This is not possible at this time as this is pretty much burned into the streets layer (streets, streetnames, and place names). If you want further customization, I would suggest looking into TileMill and using something like the OSM Bright Quickstart to make custom basemaps.

How to convert shapefile to tile based file

I am developing a Map based iPhone application where I have to draw a map of any specific region depending upon the current location of that device.
Client is supplying me the .shapefile consisting of all the co-ordinates and data to draw the map.
We can store the shape file on the server and i think to draw the map on device with the data presented on .shapefile I need the tiles with different zoom level. So on the server side I have to convert the .shapefile into tile based file.
But I don't know how to do that conversion.
Can anyone please guide me?
Thanks in advance.
Ritz
Its a lot of work.
First, shapefiles only define the geometry - you need to decide what the features are going to look like. Are they points, lines, or polygons? Do you want them all in the same colour, or depending on their attributes?
Then get mapnik or TileMill and learn how to use that. Do you just want to present the shapefile, or do you want that on a base map? In which case you'll have to generate a transparent tile set and do raster image overlays in your application.
Is it the whole world? And to the same resolution as Google Maps zooms? Get a big bank of disk storage.
http://mapbox.com/tilemill/
http://mapnik.org/
Personally I'd look into converting the shapefile into a vector form that you could render on the client - GeoJSON perhaps. Then serve that.