1

I would like to use Leaflet or a Leaflet-like mobile-friendly library to produce a web map of points of interest, but I am concerned with how easy it is to just scrape the data from the javascript. Is there a way to prevent this?

  • 1
    use a wms instead – Ian Turton Jun 5 '13 at 15:28
  • 2
    Just thinking aloud here...why not return the POIs as medium-size images (generated at the server) containing a single point symbol on each with a transparent background? The point symbols could be drawn at random locations in those images and the images can be offset to overlay the point symbols in the right places on the map. This indirect representation of the point coordinates would make it difficult for a scraper to extract them. Is this the sort of thing you are looking for? – whuber Jun 5 '13 at 16:01
  • I always appreciate your creative solutions, whuber. In this case it's probably not quite what I need (points should be clickable with popups) but there might well be other scenarios where this would be worth pursuing. – rudivonstaden Jun 5 '13 at 19:38
  • obfuscate your javascript stackoverflow.com/questions/194397/… – Mapperz Jun 6 '13 at 1:05
  • Mapperz, obfuscating the javascript would be useful for protecting the programming logic (which is not needed in this case), but my understanding is that the data will still be easily copied. At least this is my conclusion from testing an online obfuscator. – rudivonstaden Jun 6 '13 at 8:01
3

There isn't really going to be a great solution.

If you put your site behind SSL and made your data stuff that your script downloads through AJAX calls, then at least you don't have your data right there in the page or script source nor is it available to packet sniffers but someone could run your page in a script debugger such as Chrome offers and they could grab your data as the script processes it.

  • Thanks Russel, I think that a combination of a strongly worded legal statement (mileage may vary) and this approach will probably work in this case. I found a useful tutorial at SWITCH2OSM – rudivonstaden Jun 6 '13 at 8:20

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.