Hot answers tagged

33

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% ...


18

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 ...


16

A great solution is to use QGIS as you 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 tou need to view, edit and create maps from your data.


13

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.


11

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 ...


11

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 ...


10

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.


10

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 ...


9

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 ...


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

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


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

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.


7

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 ...


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

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

Absolutely Matt. Using vectors as the datasource for maps is ideal for high resolution printed output and MapBox vector tiles work well to distribute large data like OSM efficiently. I think the problem in getting something like this working is purely on a software level - you need the capability to mosaic tiles together, apply styles to them, and then ...


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

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

That will work as Mapnik can be configured as a WMS (http://code.google.com/p/mapnik-utils/wiki/WmsInstallGuide) but I think you are supposed to just build out all the tiles in the world and serve them directly to openlayers (assuming that you have enough disk space). See http://openlayers.org/dev/examples/tilecache.html for an example.


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

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 ...


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).


5

Why don't you try the OSGEO Live DVD, check this website for more information and download.


5

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 ...


5

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


5

Instead of select distinct (which would not work, because all routes differ slightly, even if for a direction), use select ST_LineMerge(ST_Union(way)) as way, ref from ... where ... group by ref.


5

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/


5

Yes. tessera was built for exactly this use-case. See tilelive-tmstyle. To run, first make sure that your tm2 project.yml file points at a local source (e.g. mbtiles:///path/to/archive.mbtiles), then: npm install tessera tilelive-tmstyle mbtiles node_modules/.bin/tessera tmstyle:///path/to/project.tm2



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