I actually did something like this somewhat recently.
I created a heightmap editor for an old game that still has a community around it.
I essentially made it so 1 pixel represented one tile of the map (thus using a
sf::VertexArray of
sf::Points), though, this caused problems with zooming, so much like Nexus suggested, I ended up drawing first to a
sf::RenderTexture, and then applying the
sf::View to the window before drawing the
sf::RenderTexture to the window. Works pretty well actually.
Take a look at
the code if you want. It was mostly produced late at night, so forgive me on some of the code quality.
Based on what you said, you'd probably be most interested in
main.cpp, minus the event handling. You might find some parts of the
Map class helpful.
HeightZone and
HeightEntry will be largely irrelevant, unless you want to see some fun bit-twiddling.