Configuring a Map

From MemberPlugin

Jump to: navigation, search

Contents

What is this?

You can get the plugin to display a map of outstanding OFFERs and WANTEDs within a number of days.  It looks like this:

Image:Map.jpg

How do I configure it?

This is controlled via the following Expert configuration in the editor.

 If you're using one of the standard sets of configuration 
(e.g. http://www.memberplugin.org/MemPrefs.js) 
 you'll need to create your own configuration file before you can use the map 
 function - see here and here.

Here's the basic configuration you need to set up.

  • Show Google Map of Posts controls whether the map is visible.  You need to turn this on before your members can see maps.
  • Map Search Hint is to help Google find the right places. It's added to the locations extracted from the subject lines before they're sent to Google. For example, I set mine to , Edinburgh, Scotland, UK.
  • Days to cover controls how recent items need to be to be on the map. The shorter this is, the faster the map is to load; the longer it is, the more posts there'll be on a map.  For a small group of a few hundred members you might want to set this to 7 or 14; for a busy city group you might want to set it to 3.  I'm a city boy, so this defaults to 3.
  • Map Default View is the map view to use if the member hasn't yet saved one (which is also what they'll see the first time they see the map). You don't have to set this up, but it'll make it look nicer if you do.  Set this up carefully as follows.
    • Go to your group's Messages page to see the map.
    • Zoom the map to where you want it to be.
    • Click on Click for mapping details below the map.
    • Cut and paste the text below the map, which will look like 5|(54.95097090366633, -9.4482421875)
    • Make sure you get it exactly right. If you don't cut and paste it, you'll get it wrong.

That's what you need to set up for the basic map to work. You'll also need to fine-tune the mapping once it's in place - you'll see other configuration fields for that in the editor. See below.

Don't forget that if you change the configuration, you need to disable/enable the plugin to force it to pick it up sooner than 24 hours. Your members will pick up changes within 24 hours.

How does it get the locations?

It uses the subject prefix and suffix you've configured. For example, if your subject lines are set up to be of the form OFFER: Item (Location) then it can extract Location from there.

If your subject lines contain locations which can't be extracted like this, then they won't be displayed on the map.

How do I know how well it's working?

Three ways:

  1. Click on Click for mapping details below the map. That will tell you how successful it is at matching.
  2. Gradually zoom out from your area to the world view, to spot items it's placed in completely the wrong place.
  3. Check a few markers on your map from time to time to look for ones which are misplaced.

How effective it is will vary from group to group, depending on how often your members put locations in the subject lines, and how well they use punctuation to identify them.  But it's surprisingly effective - on the Edinburgh group it's mapping 96% of posts.

It's got a location wrong, what shall I do?

If a marker is in the wrong place, drag to the right place. You'll see some text appear below the map:

Image:DragLocation.jpg

You can cut and paste this text into your configuration as an entry in Location overrides, so that from now on it will know to map that location to those coordinates.

Alternatively, you can enter an override which it will search for instead:

  • Try alternative placenames, or a specific street name.
  • Sometimes postcodes or Zip codes will work whereas placenames won't.
  • For example, Old Town isn't mapped correctly for Edinburgh, so I set mine to Old Town=Royal Mile, so that when the location is Old Town, it will search for Royal Mile instead.
  • Separate entries with semicolons.

It can't find a location in the subject line, what shall I do?

Sometimes you'll see a location which isn't matching because you can see the locations have words in which aren't really part of placenames, and confuse Google.

  • Location ignores lets you put words in so that the plugin can remove them before trying to match. 
    • Separate them with semicolons. 
    • This defaults to area;district;near;top of.
  • Known locations lets you increase the chance of matching a location:
    • You can specify a list so that it can find them wherever they appear in a subject line.
    • Separate them with semicolons.

You might also need to change your search hint (though obviously that might affect other places too, so you should be careful about that).

Is this a violation of Yahoo's Terms of Service?

Yahoo's TOS forbids publishing content via another website. Most attempts to map posts work by republishing the posts from a group on another site, often visible to anyone. That approach breaks Yahoo's TOS.

By contrast, the plugin map function works on your members' browsers.

  • Your group's posts are not published via another site.
  • In terms of where data lives, it's basically the same as if your members had looked at a post and used Google Maps themselves to look up the location from their own machine.

While nothing is certain without a Supreme Court / House of Lords ruling, since there's no republishing going on, this should be fine under Yahoo's TOS.

(In case you were wondering, the example post above is one of mine, and I've given myself permission to republish it on this site.)

Personal tools