3

I'm working in CartoDB on a map that is pretty much completed. I was editing a text item that I had added to the map, and I somehow moved it out of the editor screen and now cannot find it again (it has the data citation). I would assume that was deleted, but when I view my map on my organizations website where it is embedded, it is appearing in the original place. I need to edit the text item, though - any suggestions for how to locate it and move it back into the map view editor?

1

It seems that when you moved the screen, the item got hidden.

If it's an annotation element, open the JS console of the developer tools of your Browser meanwhile the Editor with the map is open, and run:

$('div.annotation.overlay').css("left", "0")
$('div.annotation.overlay').css("top", "0")

This will put the element at the top-left corner.

If it's a text item, use:

$('div.text.overlay').css("left", "0")
$('div.text.overlay').css("top", "0")

Then, once the elements are visible in the Editor, you can get rid of them or move them wherever you need.

| improve this answer | |
  • Hi - and many thanks for the response. However, I'm not clear on how to open the JS consule of the developer tools. Is there a how-to guide that could help me with this? I see where to access information on CartoDB.js, but I'm not clear on how this connects to your suggestion. – wfadmin Feb 10 '16 at 16:58
  • The console is not a part of CartoDB, is a part of your browser :-) If you are using Chrome, see how to open it here: developer.chrome.com/devtools/docs/console This will work inside the Editor, you don't need CartoDB.js! The code I pasted in the response gets the "annotation" or "text" elements and set their position to (0,0), this way if the elements are lost in the Editor in a position you can't see, they'll appear there. – iriberri Feb 13 '16 at 11:37
  • 1
    Ah perfect - that's exactly what I needed. Really appreciate it! – wfadmin Feb 16 '16 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.