CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Mapping and privacy
Pages: [1]

Author Topic: Mapping and privacy  (Read 464 times)

sjthespian

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 3
    • The League of Professional System Administrators
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.28
  • MySQL version: 5.1.66
  • PHP version: 5.3.3
Mapping and privacy
April 10, 2013, 07:01:09 am
We had enabled the map functionality in our member directory until someone pointed out that it was a huge privacy concern. I think this could be addressed with a couple of things, but I can only figure out how to do one of them at the moment.
  • Limit the zoom level in the map to prevent viewing street names
  • Prevent the member's address from showing when clicking on the icon on the map (or potentially even the name of the user)

I have a patch for the first, although it would be nice to be able to set the defaultZoom and maxZoom from the web gui rather than hacking Google.tpl
Code: [Select]
--- Google.tpl.orig 2013-04-09 16:07:11.666768987 -0400
+++ Google.tpl 2013-04-09 16:26:15.302894286 -0400
@@ -30,13 +30,25 @@
   {assign var=height value="600px"}
   {assign var=width  value="100%"}
 {/if}
-{assign var=defaultZoom value=16}
+{assign var=defaultZoom value=10}
 {literal}
 <script src="//maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
 <script type="text/javascript">
     function initMap() {
-        var latlng = new google.maps.LatLng({/literal}{$center.lat},{$center.lng}{literal});
+        var latlng = new google.maps.LatLng({/literal}{$center.lat},{$center.lng}{literal},{maxZoom:10});
         var map = new google.maps.Map(document.getElementById("google_map"));
+        /* Create callback for maxZoom */
+ google.maps.event.addListener(map, 'maptypeid_changed', function(event){
+     if( map.getMapTypeId() === google.maps.MapTypeId.TERRAIN ){
+         map.setOptions({maxZoom:10});
+     }else
+     if( map.getMapTypeId() === google.maps.MapTypeId.ROADMAP ){
+         map.setOptions({maxZoom:10});
+     }//Etc...
+     else{
+         map.setOptions({maxZoom:10});
+     }
+ });
         map.setCenter(latlng);
         map.setMapTypeId(google.maps.MapTypeId.ROADMAP);
         setMapOptions(map);

Any suggestions for how to implement the second? I suppose I could remove all references to address in Google.tpl, but it would be a lot nicer if there were some privacy settings in the web interface or this could be blocked by ACL. As it is a member currently cannot view another member's information via. Civi, it's a bit disconcerting that it is exposed on the map.
Dan Rich <drich@lopsa.org>
    Director, LOPSA - http://lopsa.org/

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mapping and privacy
April 10, 2013, 08:40:20 am

If privacy / exposing the address is a big concern. shouldn't u disable the mapping feature (which is optional?)

If you are exposing locations on the map, folks who want to get the info, can do a view source and get the lat/long of the address and an accurate location. At this point, you kinda need to obfuscate it and keep it generic at the city / county level etc

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Mapping and privacy

This forum was archived on 2017-11-26.