Skip to main content
The 2024 Developer Survey results are live! See the results
deleted 374 characters in body
Source Link
TylerH
  • 21.2k
  • 72
  • 78
  • 105

My 2 cents for what they are worth and to coin an old phrase, "We are trying to put a square peg into a round hole." Although it was interesting going through some of the above, creative if not hacky or sketchy work arounds, the simple answer surely has to be that until we get native support, we are just going to have to stick to the tried and tested methods of transferring our data. Although there would be some scenarios where if you were the creator of the map you would write your code in a separate 'src' file and save a copy as a  .txt file and, if written concisely enough, could easily be read in, deciphered, and added to server-side. the

The new file would then be saved as a .js and a reference to it sent back from the server. The file would then reconstruct it selfitself perfectly once read back in as .jsJS. The beauty being that no hacky iterating or parsing is required for reconstruction.

My 2 cents for what they are worth and to coin an old phrase, "We are trying to put a square peg into a round hole." Although it was interesting going through some of the above, creative if not hacky or sketchy work arounds, the simple answer surely has to be that until we get native support, we are just going to have to stick to the tried and tested methods of transferring our data. Although there would be some scenarios where if you were the creator of the map you would write your code in a separate 'src' file and save a copy as a.txt file and if written concisely enough could easily be read in, deciphered, and added to server-side. the new file then saved as a .js and a reference to it sent back from the server. The file would then reconstruct it self perfectly once read back in as .js. The beauty being that no hacky iterating or parsing is required for reconstruction.

Although there would be some scenarios where if you were the creator of the map you would write your code in a separate 'src' file and save a copy as a  .txt file and, if written concisely enough, could easily be read in, deciphered, and added to server-side.

The new file would then be saved as a .js and a reference to it sent back from the server. The file would then reconstruct itself perfectly once read back in as JS. The beauty being that no hacky iterating or parsing is required for reconstruction.

Source Link

My 2 cents for what they are worth and to coin an old phrase, "We are trying to put a square peg into a round hole." Although it was interesting going through some of the above, creative if not hacky or sketchy work arounds, the simple answer surely has to be that until we get native support, we are just going to have to stick to the tried and tested methods of transferring our data. Although there would be some scenarios where if you were the creator of the map you would write your code in a separate 'src' file and save a copy as a.txt file and if written concisely enough could easily be read in, deciphered, and added to server-side. the new file then saved as a .js and a reference to it sent back from the server. The file would then reconstruct it self perfectly once read back in as .js. The beauty being that no hacky iterating or parsing is required for reconstruction.