Skip to content
Advertisement

Tag: svg

Moving Bus Icon on Google Map Using JavaScript

I’m using Javascript Google Map. I want to add a moving bus icon as the map marker will reload a new location every 5 seconds. Everything is running perfectly. I just want to add an icon that will look like a real bus, which will move on the road. I did search for that and found the following code: My

Create a scale for bands with different width in D3.js

We have projects, which are assigned to different teams. Now I have to create project timelines. For the purposes of this question I have created a dummy in jsfiddle.net. https://jsfiddle.net/cezar77/6u1waqso/2 The “dummy” data look like this: The time is displayed on the x axis and there is a horizontal bar for every project stretching from the start_date to the end_date.

Set unique ID to SVG graph path

How to set unique ID to SVG graph path elements. The graph is created using leaflet.js Path elements are dynamically generated and I need to style them individually, so I thought of giving them unique ID. Please help. Answer As I’ve commented you don’t need an id for styling. You can use nth-of-type or nth-child. Also you can reduce verbosity

Trigger click on SVG image

I’m having a play with a SVG image to see if I can create a map for my website. I grabbed the image from a 3rd party site, and now I’m just trying to implement it. Here is a fiddle of what I have: https://jsfiddle.net/hL1weg3o/1/ So basically the CSS is: HTML: ..and then I’m trying to capture the clicks with:

How to show the full SVG using Fabricjs?

First time user of FabricJs and I’m trying to load these SVG files using FabricJS as shown in their examples If you run the code snippet you will see that only the top part of the image is loaded instead of the entire SVG. I tried doing this with the other method where I create a new Image() and then

Rendering heavy SVG files (improving performance)

In our company we want to come up with universal solution for creating interactive presentations as mobile applications. First idea was to create a PDF file and use it in mobile phone, it didn’t work out – it was too slow. Another idea was to convert PDF into SVGs and use them as scenes (slides) and that’s what I am

Advertisement