can i suggest you something? an array of vertices isn't overkill. but an array of sprites is
I'm not quite sure what you mean by "overkill", but an sf::Sprite is little more than four vertices and a pointer to an sf::Texture, so the two options are almost identical except that using sprites makes it easier to keep track of things like which texture goes with which vertices (which is a good thing).
Though I agree that there's no obvious reason to use shared pointers to sprites or a map from ints to anything in this case.
@simpl: Unfortunately your post is too vague and fragmented for us to really give you any sort of concrete answer, other than pointing out that the two lines of code you did post are extremely strange choices for data structures. So I'll try quick knee-jerk responses to tiny bits of your post and see if I get lucky with one of them.
It works very well, but what could I do to get a tile at a specific position?
Since you're the one loading the tiles, and we don't know how you're doing it or where you're putting them, not much we can say.
My idea was to store it somewhere else, maybe in the logic of the mapParser, but that doesnt make much sense to me.
Dunno enough about your mapParser to comment in detail. However, generally speaking, the class that "owns" a piece of memory should be the last (or only) class that actually uses it. My blind guess is that your mapParser is not this class, so perhaps it should merely take a reference to a container for it to fill up, so the caller can own that container.
Somedays I read a very interesting topic here about two-dimensional vectors for tilemaps, but I'm unable to find it .. .
That might've been me. Basically, if you want an X by Y grid of something, you can use a vector of vectors (which creates what's called a "ragged array") but for various reasons it's usually better to use a single vector of size X times Y. Some of my recent posts describe this in more detail.
My finally question is now, what are the best practices to store sprites for a tilemap?
As previously mentioned, a single vector of length X by Y is what I'd recommend. A simple std::vector<sf::Sprite> is completely fine for this. It would also be a good idea to wrap this vector in a little class that implements whatever primitive operations you expect to be performing on a tilemap.
Should I go with the current approach? Im a little bit doubtful..
Your current approach appears to be more complicated than the obvious one, so unless you have a good reason for introducing that complexity (I didn't see one in your post), then the answer is no.