mozdev.org

mapit

resources:

This manual has not been rewritten for the latest version yet. It should provide guidance but is not exactly accurate in all cases.


To install MapIt!, simply find the latest version here and click on it. When prompted, press the "Install" button. You may have to allow installations from this site. If this is the case, Firefox will warn you and you will have the option to allow this site


To configure MapIt! once it is installed, open Firefox and from the "Tools" menu, select "Extensions". You will see a list of all extensions installed in your profile. Find the MapIt! extension and double-click it. This should give you the following screens:

Map Site - This option allows you to specify the site that you would like MapIt! to send your mapping requests to. The default for this option is MapQuest. Some sites require an additional step before you will see the actual map (i.e. Terraserver). This is a limitation of the mapping site and little can be done to get around this.

Map Target - This option allows you to specify the destination window for your map requests. By default, MapIt! will open the requests in the current window

Address Identification - This option allows you to specify the behavior of the popup dialog. By default, MapIt! will only prompt you with the address dialog if it cannot find a valid street address in the selected text.

Home Address - Use this to specify a home address for driving directions.

Getting Directions - Specify the behavior to use when selecting "Show Directions..." from the MapIt! menu.

This tab allows you to customize the regular expressions MapIt! uses to parse addresses from selected text. The addresses are parsed from top to bottom in the list and MapIt! will stop when the first positive match is found. The expressions are provided in a string context (no leading and trailing slashes). For information about regular expressions in Javascript, visit webreference.com.

The regular expressions provided must contain the fields of the address in a particular order. Here's an example expression:
(\d+\D*\s+.*)[,\n]\s*([A-Za-z].*[A-Za-z.])[,\s]+([A-Za-z.]*)\s+(\d{5})
The groupings (bounded by ()'s) in the expression determine the fields within the address:

To add a regular expression, simply type it in the space provided and press "Add" and it will be placed at the bottom of the list.

To change the order in which the regular expressions are parsed, select the regular expression you wish to move and use the "Move Up" and "Move Down" buttons.

To remove a regular expression, select the regular expression in the list and press the "Remove" button. This will place the removed regular expression in the "Add" box, just in case you didn't really want to do that.


To use MapIt!, simply highlight an address within a web page, right click, and select the "MapIt!" menu. This will bring up the MapIt! context menu.

Show Map - This will attempt to read the highlighted text for an address and display the map as specified in the Setup Tab.

Get Directions To... - This will attempt to read the highlighted text for an address and display directions to the highlighted address as specified in the Setup Tab & Defaults Tab.

Get Directions From... - This will attempt to read the highlighted text for an address and display directions from the highlighted address as specified in the Setup Tab & Defaults Tab.

If no valid address can be found when you right-click, the MapIt! menu will not be displayed if you have selected "Never Allow Uncertain Addresses" on the Setup Tab.

 

For questions or comments not about a specific project, please read our feedback page.
Copyright © 2004. All rights reserved. Terms of Use.