Manu
Manu

Reputation: 4500

Creating a google map without giving the user a full list of locations

I'm using a Google Map to display a list of addresses across the country.

What troubles me is that anyone clicking "view source" can have the list, including coordinates and name :

placemarker(50.3161,4.93133,'store1', 'address1');
placemarker(48.6599,2.32982,'store2', 'address2');
placemarker(43.4512,5.41388,'store3', 'address3');
placemarker(48.8832,1.46008,'store4', 'address4');
...

Is there a way to display markers on the map while making it harder to extract the full list ?

Upvotes: 1

Views: 55

Answers (1)

duncan
duncan

Reputation: 31922

obfuscate your code:

eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('3(9.b,4.e,\'c\',\'0\');3(6.a,2.7,\'8\',\'0\');3(d.f,5.k,\'i\',\'0\');3(6.j,1.g,\'h\',\'0\');',21,21,'address4|||placemarker|||48|32982|store2|50|6599|3161|store1|43|93133|4512|46008|store4|store3|8832|41388'.split('|'),0,{}))

Upvotes: 2

Related Questions