I'm working on a visualization project where I'd like to use a fill color over US Counties that fall into my data set. (weather data)
I have shapefiles for the counties, but there are hundreds (if not thousands) of points per county, and some parts of my data can cover 20+ counties. I'm thinking that manually drawing the polygons may not be the approach to take.
Is there an efficient approach using the MapBox SDKs for accomplishing what I'm trying to do? I'd like to do it both in web and mobile if possible, but I'll start with web.
You want to look into TileMill in order to make custom map tiles with your source data. Then, you can use those tiles on web and mobile both.
https://www.mapbox.com/tilemill/docs/guides/add-shapefile
https://www.mapbox.com/tilemill/docs/guides/styling-polygons/
https://www.mapbox.com/tilemill/docs/crashcourse/exporting/
https://www.mapbox.com/mapbox.js/example/v1.0.0/layers/
https://www.mapbox.com/mapbox-ios-sdk/#tile_sources__protocol
Related
NOAA stopped their Seamless Raster Navigational Chart Services URL this year. I was using it in a simple leaflet.js project, and need a replacement or update.
Going through the various documents on using their new vector data gets me lost very quickly. Is there a "simple" workaround? Or a suggestion or pointer to simpler documentation that doesn't require significant GIS knowledge? Or an alternative service, similar to Open Street Maps but more nautically focused?
Thanks.
Is it possible to use different colors for Tiles in Open Street Map?
In Google Maps API you can style the map - is there a same feature in Open Street Map or even better are there any different tile templates on the web for download and use in OSM?
OpenStreetMap project provides map data. In order to display web maps OSM data needs to be pre-processed and rendered. Depending on whether you use raster (for example default leafler) or vector tiles (mapbox-gl) steps to modify styles are completely different. Raster styles are usually generated using mapnik rendering library with mod_tile and apache web server. OSM data needs to be imported into PostgreSQL database. Depending on the amount of data you want to process it can take different time from couple of hours for single city to days for the whole planet and require very good hardware (6-8 cores/ 32 GB ram and higher). Then you need to edit special CartoCSS styles to change map appearance. Vector maps and tiles is completely different story but it will require comparable efforts to create your custom map style.
What I suggest is to go and find OSM maps provider that have different styles from default OSM by the way here is an excerpt their tile usage policy (https://operations.osmfoundation.org/policies/tiles/):
OpenStreetMap data is free for everyone to use. Our tile servers are not.
So look at these providers, they can save you a lot of time and money:
https://openmaptiles.org
https://getmaps.io
https://stadimaps.com
and others from https://switch2osm.org/providers/
Is there a way to use own custom data for traffic using the gmap, mapbox, leaflet. I just want to show custom data set for traffic using the map like google map indicating traffic in different colors in lanes. I just want to show the same but using own custom traffic data.
Any help would be appreciated.
there is no any Leaflet API to show traffic but you can applies traffic flow data to the map tiles before serving them by using Mapbox to draw on a Leaflet map to represent traffic.Here is the best approach that is not be using Leaflet functionality at all.
A web mapping library allows you to add a map to a web page and define the data it contains, its appearance, and a variety of functionality. Think of it like a toolbox filled with many different map-making tools that can be used together to build beautiful and interactive custom experiences.
I have a GeoJSON file of fly tip incidents that have happened over the last year which is updated regularly.
I am looking for a solution where I can add this data onto a map and symbolise it to show one marker for incidents that have happened over the last month, another for between 1 and 3 months, and a final marker for any incidents from over 3 months ago.
I have thought about using one of MapBox, CartoDB or Leaflet, do these libraries have the capabilities to be able to style data in this way? I want to keep my data locally so do not want to load it into an online account.
I'd like to know if this can be done with one of the above.
Thanks
MapBox and CartoDB services are built onto Leaflet library. You can use them for everything (including uploading your data), or just for the background map. So even with them you can keep your data locally.
Leaflet is the sure choice for total control of your data, as you will be doing all the operations yourself.
Note that you also have other libraries that provide you with the same control with that respect, like OpenLayers, and D3 to some extent.
As for displaying different markers based on age of your data, there is no special difficulty in doing so.
Does OpenStreetMap just provide GIS data? To render maps and have a browser based UI to show maps with data, would a developer need to use something like Mapnik?
OpenStreetMap provides data yes, and you'll need specific tools to make map with them. You first need to put the data in a true GIS format, which OSM is not. Think about PostGIS, an osm2pgsql tool is designed for that. Then, you'll need a rendering tool, i.e. a cartographic engine. You can use Mapnik or MapServer. Tilemill or Kosmtik can help you designing your map styles.
Take a look here.
yo can export data form OpenStreetMap and render your own map.
Take a look at
http://www.slideshare.net/jones139/rendering-openstreetmap-data-using-mapnik
http://www.slideshare.net/artemp/mapnik-sotm-2007
There's a fuller list of rendering libraries for OpenStreetMap data here, both free and commercial.
http://wiki.openstreetmap.org/wiki/Renderer
Disclosure: I am the developer of one of them.
OpenStreetMap provides map data out to a wide sprawling ecosystem of different downloads and tools offering developers different map-making and map using possibilities. Here is a diagram I drew which captures some of this:
So the data comes out of the core of OpenStreetMap, in the form of 'planet downloads', one big unwieldy blob of XML (and diffs), but from there it fans out into a range of other offerings to developers, many of which are provided by 3rd parties. Taken together "OpenStreetMap & Friends" provide lots of possibilities.
If you are inclined to run your own rendering system, then yes, Mapnik is a good choice. Powerful and scaleable (most successful OSM tile servers run Mapnik), but takes a bit of setting up. You normally load OSM XML data into PostGIS, and run mapnik from that (tutorials on switch2osm.org)
If you are not inclined to run your own rendering system (for more lightweight web development tasks this seams reasonable!) you don't have to! You can configure LeafletJS or OpenLayers or others to fetch map tiles from a tile server run by somebody else. There are many providers. See the providers list on switch2osm.org and the Tile Servers list.