Mapping - Final
How do I make an mapping - final?
What is a mapping - final? How do you make a mapping - final? This script and codes were developed by Nick Walsh on 06 November 2022, Sunday.
Mapping - Final - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Mapping - Final</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ canvas { background: #c9c4bc; display: block;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js'></script>
<script src='http://s3-us-west-2.amazonaws.com/s.cdpn.io/68727/topojson.js'></script> <script src="js/index.js"></script>
</body>
</html>
Mapping - Final - Script Codes CSS Codes
canvas { background: #c9c4bc; display: block;
}
Mapping - Final - Script Codes JS Codes
(function() { var cache, canvas, circle, ctx, ctx_cache, draw, height, init, offices, orlando, path, path_cache, projection, width; offices = [ { coord: [-81.379092, 28.542884], r: 50 }, { coord: [-81.379002, 28.540481], r: 33 }, { coord: [-81.369515, 28.538479], r: 17 } ]; height = window.innerHeight; width = window.innerWidth; projection = d3.geo.mercator().center(offices[offices.length - 1].coord).scale(400000).translate([width / 2, height / 2]); canvas = d3.select('body').append('canvas').attr('height', height).attr('width', width); cache = document.createElement('canvas'); cache.height = height; cache.width = width; ctx = canvas.node().getContext('2d'); ctx_cache = cache.getContext('2d'); path = d3.geo.path().projection(projection).context(ctx); path_cache = d3.geo.path().projection(projection).context(ctx_cache); circle = d3.geo.circle(); orlando = null; d3.json('https://s3-us-west-2.amazonaws.com/s.cdpn.io/68727/orlando.json', function(error, data) { orlando = data; init(); return d3.timer(draw); }); init = function() { ctx_cache.beginPath(); path_cache(topojson.feature(orlando, orlando.objects.neighborhoods)); ctx_cache.fillStyle = '#dcd8d2'; ctx_cache.fill(); ctx_cache.lineWidth = '2'; ctx_cache.strokeStyle = '#c9c4bc'; ctx_cache.stroke(); ctx_cache.beginPath(); path_cache(topojson.feature(orlando, orlando.objects.streets)); ctx_cache.lineWidth = '1.5'; ctx_cache.strokeStyle = 'rgba(0, 0, 0, 0.08)'; ctx_cache.stroke(); ctx_cache.beginPath(); path_cache(topojson.feature(orlando, orlando.objects.lanes)); ctx_cache.lineWidth = '6'; ctx_cache.strokeStyle = 'rgba(0, 0, 0, 0.1)'; ctx_cache.stroke(); ctx_cache.lineWidth = '3'; ctx_cache.strokeStyle = 'rgba(255, 255, 255, 0.9)'; return ctx_cache.stroke(); }; draw = function() { var i, len, office; ctx.clearRect(0, 0, width, height); ctx.drawImage(cache, 0, 0); for (i = 0, len = offices.length; i < len; i++) { office = offices[i]; ctx.beginPath(); path(circle.origin(office.coord).angle(0.0005)()); ctx.fillStyle = '#3388a7'; ctx.fill(); office.r -= 0.2; if (office.r <= 0) { office.r = 50; } ctx.lineWidth = office.r; ctx.strokeStyle = "rgba(51, 136, 167, " + (1 - office.r / 50) + ")"; ctx.stroke(); } return false; };
}).call(this);
Developer | Nick Walsh |
Username | nickawalsh |
Uploaded | November 06, 2022 |
Rating | 3 |
Size | 3,755 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Mapping - 1 | 2,863 Kb |
Citrus Bowl | 5,981 Kb |
Animations with d3-timer | 2,728 Kb |
Swan | 3,872 Kb |
Sliding Tiles | 2,978 Kb |
Airline Noise | 3,484 Kb |
Radar | 4,953 Kb |
Extend Interpolation | 2,493 Kb |
Project DNA | 2,925 Kb |
Animations without d3-timer | 2,803 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Drag n Drop | Martin42 | 2,594 Kb |
Slide out Menu | Rbiggs | 4,936 Kb |
Custom Select Element | Agrayson | 3,616 Kb |
Zip Button test | Lje7462 | 1,932 Kb |
Marching Squares Visualized | Sakri | 7,074 Kb |
Countdown with Rings | Ewganoel | 2,490 Kb |
Box Shadow Effects | Retrofuturistic | 2,143 Kb |
SVG Basics | HipsterBrown | 1,852 Kb |
Gradient-ui-button-mark-fx | Tabspace | 1,881 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!