parent
48b63fe41a
commit
f034ed36b6
@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>CARTO VL Example</title>
|
||||
<!-- Load CARTO VL JS -->
|
||||
<script src="https://libs.cartocdn.com/carto-vl/v1.0.0/carto-vl.min.js"></script>
|
||||
<!-- Load Mapbox GL -->
|
||||
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.js"></script>
|
||||
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.50.0/mapbox-gl.css" rel="stylesheet"/>
|
||||
<!-- Load CARTO VL Styles -->
|
||||
<link href="https://carto.com/developers/carto-vl/examples/maps/style.css" rel="stylesheet"/>
|
||||
<style>
|
||||
#map {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
</body>
|
||||
<script>
|
||||
const map = new mapboxgl.Map({
|
||||
container: 'map',
|
||||
style: carto.basemaps.voyager,
|
||||
center: [-3.6908, 40.4297],
|
||||
zoom: 11
|
||||
})
|
||||
|
||||
carto.setDefaultAuth({
|
||||
username: 'cartovl',
|
||||
apiKey: 'default_public'
|
||||
})
|
||||
|
||||
const viz = new carto.Viz();
|
||||
const source = new carto.source.Dataset('madrid_listings');
|
||||
const layer = new carto.Layer('layer', source, viz);
|
||||
layer.addTo(map);
|
||||
</script>
|
||||
</html>
|
Loading…
Reference in new issue