38

Unfortunately, there isn't one yet. I've asked myself the same thing occasionally but I've found a handful of examples through the years that I've drawn some inspiration and learned through. Unfortunately, most authors aren't putting their all or some of their work public. Also, there's been a couple small changes in carto, some of the code may not be 100% ...


25

First you need to project your geographic coordinates to a cartesian 2D coordinate system, since affine transformations don't apply to geographic coordinate systems. You can apply an affine transformation from control points or from transformation parameters. The QGIS plugin asks you transformation parameters, but it is much more common for a user to have ...


22

You forgot to add Leaflet CSS: <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> Also there are numerous typos in your code: for example, in html, body{} stylesheet line. Do check for them before deploying to production.


21

A great solution is to use QGIS as a GUI for PostGIS. QGIS is a fully-functional GIS (I prefer to think of it actually as a meta-GIS given that it is built on many GIS packages). It has built-in support to connect to PostGIS and therefore gives you all the tools needed to view, edit and create maps from your data.


19

TileMill is designed for producing raster tiles. It's powerful and easy to use with CartoCSS and I found it ran well with no bugs (PC version). It's also pretty well documented, with lots of examples and the tiles produced are easy to integrate with Leaflet.js web sites. Vector tiles potentially offer many advantages, in terms of styling flexibility and ...


13

I am a long time user of TileMill which is a great tool. After spending two weeks testing MapBox Studio and I can say it was a huge disappointment. 1) It is so buggy that it is practically unusable, both on Windows and Mac versions (and especially on Windows), the program literally crashes every 2 min. 2) The interface is less intuitive and practical than ...


11

This somewhat exists - here's a page of the various converters available. Exporting CartoCSS from other tools requires both mangling the native format and normalizing differences between how they treat data & the capabilities of the renderer.


11

I found it at last.Tilemill commands should run via node that included in the same directory with index.js file.I was trying to run directly index.js as index.js export .. which is not working. @Sunil's redirection to support page allowed me to install ubuntu and see code was working then i realized that it was all working with nodejs functionality.After ...


11

You may be interested in Kosmtik, which is an alpha project with similar aims to TileMill and under active development.


10

There are several open data initiatives on elevation (terrain) data. A website with several alternatives (I have not checked them all) is available on this website: http://www.terrainmap.com/rm39.html For 90 meter accuracy dataset I would try the Shuttle Radar Topography mission (wikipedia article). I have used it on several occasions. An example of what ...


9

I tried to explain the relevant details of your interest below. I want to say briefly, if you want to build great application what you're looking for is that OpenLayers. OpenLayers is an open source JavaScript library which provides lots of rich method for building web-based application similar to Google Maps. it supports lots of events and controls beside ...


9

Unlike normal CSS, the order of your properties matters in Carto - reverse the marker and text rules and it'll reverse their order in rendering. You must also make sure to set text-allow-overlap to true.


9

Definitely open to adding more features/functionality to my QGISTileMillExport plugin (as well as adding it to one of the plugin repos for easier installation once it's a bit more mature). I stubbed it out as a proof of concept for my own use a few months ago. As for workflow, I saw it as a way to bridge between data/rough styling in QGIS and final ...


9

TileMill is released under the BSD 3-clause license, an OSI approved license. https://github.com/mapbox/tilemill/blob/master/LICENSE.md So in answer to your question: Yes, TileMill is open source. Mapbox Studio is released under similar terms: https://github.com/mapbox/mapbox-studio/blob/mb-pages/LICENSE.md Some more information: http://en.wikipedia....


8

There's a lot of subjectivity still in play, but I think a broad answer to your question is that it's getting easier every day to use GeoJSON directly in a leaflet map without tiling, and this is ultimately a good direction for interactive maps to be going. As such I tend to build maps using your third option above. That comes with a few caveats. You ...


7

Natural Earth has many top-notch free products that may work for you, including: Natural Earth I with Shaded Relief, Water, and Drainages Shaded Relief Basic


6

(Cross-posting from GitHub for the benefit of StackExchangers..) Both filters must be connected to a layer selector. There are two options that require only specifying the style once: #tor_centreline [FCODE=201200], #tor_centreline [FCODE=201201] { line-width: 0.5; line-color: lightgray; } or #tor_centreline { [FCODE=201200], [FCODE=201201] { ...


6

When you add a layer to a TileMill project, you need to also create a style definition for that layer. If there is no style definition, nothing will show up. When creating a new layer, you can click the 'Save & Style' button to have TileMill insert some default styling code for you. Based on your first screenshot (in which I see two line shapefiles) you ...


6

You can't use zoom as a variable at the moment as you mentioned. I've read this is planned (and I'm excited to see it implemented too). Here's one work-around, etc: #ways[highway="trunk"] { line-color: #c99; [zoom=10] { line-width: 1; } [zoom=11] { line-width: 1.1; } [zoom=12] { line-width: 1.2; } If you have multiple highway types, you ...


6

Check this CartoCSS port of the OpenStreetMap default style. https://github.com/gravitystorm/openstreetmap-carto


6

Ok, in the end this script did the job: X1=456 Y1=307 X2=469 Y2=316 Z=9 for x in `seq $X1 $X2`; do for y in `seq $Y1 $Y2`; do echo "Getting ${x},${y}" curl -s http://localhost:20008/tile/SteveCountryVic/${Z}/${x}/${y}.png -o ${Z}_${y}_${x}.png & done wait done montage -mode concatenate -tile "$((X2-X1+1))x" "${Z}_*.png" out_z${Z}_${X1}_${Y1}-${X2}_${Y2}....


6

For a simple way to add markers on top of an OSM based map: uMap This lets you add markers, or draw lines or areas on the map. You can import data from a GPX, KML, or GeoJSON file etc. It has a number of different tile layers to choose for the background map. You can share a link to the map if you want, or embed it another webpage. By default, any maps ...


6

The GADM database of Global Administrative Areas has downloadable shapefile up to level four for Viet Nam. One of the best covered country. http://www.gadm.org/


6

This is an interesting question which I've been asking myself every month or two for the last year or so. It's not straightforward. Some things to consider: Vector tiles vs raster tiles Mapbox Studio only does vector tiles, TileMill only does raster tiles (and static images). There is a raster tile endpoint for Mapbox Studio now: https://www.mapbox.com/api-...


6

We use a trick like: <style type="cartocss/text" id="simple"> #earthquakes_cdbjs_lesson3{ marker-fill: #FF6600; marker-allow-overlap: true; ... } </style> and after that cartocss: $("#simple").text();


5

An alternative to the WMS route: Use GDAL2Tiles to create a TMS tileset out of your imagery. Then load up Leaflet, which is a lighter-weight alternative to OpenLayers, a javascript map client. Design buttons that interact with it. This arrangement will let you portably run the above through any webserver, without requiring the configuration or ...


5

Woohoo! Figured it out. This thread had the solution to change the CSS rather than the JS. .olImageLoadError { /* when OL encounters a 404, don't display the pink image */ display: none !important; } This help article was helpful too, but I have not idea how to tell TileMill/MapBox to generate blank tiles rather than missing tiles. I'll get there ...


5

It is currently not possible to add mbtiles to TileMill. You're best bet is to use one or more GeoTIFFs instead. http://support.mapbox.com/discussions/tilemill/16-can-you-add-mbtiles-to-an-existing-project


5

I think it would depend on your needs and available resources. You can use both a map server and a tile server. For example, Geoserver comes with Geowebcache, a tile server. I know that a server map use spatial data from a DB, it generate image that can be read by client map library (openlayer ...). For example if I have a shapefiles and I don't need ...


5

In this Wiki we maintain a list of free data sets: http://grass.osgeo.org/wiki/Global_datasets#Elevation_data For several also the import commands for GRASS GIS are stated (in many cases read with GDAL, hence the GDAL tools should work as well).


Only top voted, non community-wiki answers of a minimum length are eligible