score:0
If you're open to try, you can use mapbox-gl.js library, which allows to use personalized vector tiles as basemap, so you can customize any element of the basemap. Here you can find some guidelines. Then, it's as easy as passing a property to the map definition:
//Mapbox API Token
mapboxgl.accessToken = '{API TOKEN}'
//Setup mapbox-gl map
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/{USERNAME}/{STYLE_ID}', //Copied from Mapbox Studio
center: [Lng, Lat],
zoom: 4,
})
Additionaly, you can use D3.js to work with your data layers, as shown in this example, you just need to include the update()
and projectPoint(lon, lat)
functions after loading data into SVG elements.
I recently managed to configure the vector tiles and it's awesome how smooth they run with pan/zoom/rotation.
score:1
Simply don't add any L.TileLayer
s to your map, and use CSS to set its background.
Source: stackoverflow.com
Related Query
- Is it possible to have a white basemap using d3.js and leaflet?
- How to show the unhighlighted/ not selected data points on scatter plots when using brush/group in dc.js? And is multiple brushes possible in dc.js
- Rendering geoJSON using D3 and Leaflet using imageOverlay
- First time using d3 and rawgit and it seemed to have stopped working
- I have created tree using D3 tree js. Point is I need the value of top and left of each tree node. How can I get the top and left value of tree node?
- Changing opacity for GeoJSON feature using d3 and Leaflet
- 3 dimension (X, Y and Z) graph using D3.js
- Simple graph of nodes and links without using force layout
- Is it possible to determine if a GeoJSON point is inside a GeoJSON polygon using JavasScript?
- Properly display bin width in barChart using dc.js and crossfilter.js
- D3: Is it possible to zoom+pan one axis and only pan the other?
- Achieving animated zoom with d3 and Leaflet
- "Stuttering" drag when using d3.behavior.drag() and transform
- Displaying map using d3.js and geojson
- Rendering in Backbone.js using d3.js and svgs
- Saving and reloading a force layout using d3.js
- Zooming and Panning a Mercator Map centered on the Pacific using d3.js
- Compilation errors when drawing a piechart using d3.js and TypeScript
- How to use `this` and `_this` (fat arrow) using coffeescript?
- IE11 does not accept SVG height and width when using D3
- Nvd3: How prevent to display chart between -1 and 1 if have all y values 0?
- Increase and decrease radius of a circle using d3 transition
- D3 using classed() to add and remove class with checkbox
- How can I show a graph using d3 force layout with initial positions set and no movement at all?
- Can it is possible to use click event in tag cloud of D3 and If yes how?
- Using RequireJS to load D3 and Word Cloud Layout
- Using AngularJS / AngularUI with d3.js and DOM effects
- Using d3 to create a density & value heatmap layer for leaflet
- How do I get a topojson layer to show up in leaflet using d3?
- Is it possible to have zooming option in NVD3 charts as like in Highcharts?
More Query from same tag
- dc.js reduce space/padding inside svg element
- Using D3.js to create a simple treemap
- d3 event handler on node not in HTML DOM
- Highlight parents of list but not all children
- How do I take into account scale when getting height/width of a d3 element using bounding rectangle
- d3 force layout repulsive charge formula
- d3.js 'mousewheel' event is NOT working on Firefox (it works only in Chrome, Safari and IE browsers)
- d3js select circle with specific text label
- Repeat the animation only a given number of times
- Implementing zoom buttons using d3
- Texts in bubbles overlap in force simulation
- Performance of svg:svg vs svg:g elements
- Unable to select <linearGradient> with D3.js in Chrome
- d3.conventions not a function at script.js
- How to get the selected index from a dropdown menu in d3
- Does ReactJS have impressive performance when rendering huge matrix?
- searching a d3 tree - reset after search
- Chart won't redraw in `onchange` function
- Add mean value and n-number to nvd3 boxplot
- d3js bar graph with x+y axes: x axis value distribution
- Render HTML on X-Axis Ticks
- D3 Concentric/Nested Donut Chart
- Creating a line graph from array of data objects
- How to delete a d3 pie chart
- Trace path with DOM object
- Update options in a drop-down menu based on another drop-down
- Svg getComputedTextLength function always returning zero
- Each parent-child pair has same color in D3 Hierarchy Typescript
- Draw text on svg path element with d3.js
- Setting a text field in d3 javascript with a condition