1) "Shouldn't it be daakaar because of the ا?"
In our daily conversation, it's not a must to spell the long Harakaat sound accordingly. As long as the meaning is not misunderstood, it's okay. -- But, if we recite Quran, we should.
2) "Or rather why is the ا used here instead of just the line on top of the d and the k"
It's (not?) possible to use: ٰ on top the d and the k so it will be دٰكٰرُ daakaar. The reason is that how it should be written.
However, originally Arabic doesn't use Harakaat, so writing دكر will clash with another word, that uses ٌدِكْر a kind of game played by Euthopians زنح / حبش.
So, it is دَاكَارُ.
(Note that daakaar is not an Arabic word. And, please correct me if I'm wrong).
It is name of a city. So it has a standard spelling in English. And Arabic has a standard spelling which doesn't resemble the English spelling. But that can't change the way of pronouncing the name right?? Just like in Arabic Peru is written as Biiruu because of the absence of the letter 'P' but still pronounced as Peru.
This comment pertains to all the translation exercises, not just "Dakar": Could you please lump all the English-to-Arabic questions together, instead of alternating E-to-A and A-to-E? I like to use my keyboard (to learn how to type and how to spell) instead of the word bank, and it is inconvenient to change keyboard languages all the time. Thanks!