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?
Asked
Active
Viewed 1,622 times
1
-
1use a wms instead – Ian Turton Jun 05 '13 at 15:28
-
2Just 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 05 '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 05 '13 at 19:38
-
obfuscate your javascript http://stackoverflow.com/questions/194397/how-can-i-obfuscate-javascript – Mapperz Jun 06 '13 at 01: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 06 '13 at 08:01
-
I know the answer to this question but I'm not going to tell you :| – boulder_ruby Jun 16 '16 at 15:35
1 Answers
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.
Russell at ISC
- 1,912
- 10
- 11
-
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 06 '13 at 08:20