Latest Register Log In

+ Advanced Search

Google Maps

Google Maps
By
04/23/08 (Edited 07/16/17)

When cataloging data which has a physical location, you may want to display it on a map to help viewers find it. The "google maps" switch at Admin Panel -> Settings -> Switches will active a google map with a pin identifying the location. Note that this is nested under the "Addresses" switch so you will have to check the box for "Addresses" to see the maps switches.

If you have geographically-limited categories, you may want to display all the items on the category page in a map with a pin for each. Activate the "category google maps" switch for that.

The google map pin template at Admin Panel -> Themes -> Manage Templates -> Subtemplates -> Map Pin allows you to customize the look of the pins that appear on the maps.

Choosing When to Show a Pin

Normally, a map pin is only created when you enter a full street address. If you want to show pins for cities or postal codes when you have no specific address, go to Admin Panel -> Settings -> Tweaks Editor and check the box for 'geocodezip'. With that checked, it'll geocode and create a pin even if there's no street address entered.

Category Maps

The "category google map" switch enables a map that shows articles from the current category. The number of pins displayed is the number you set at Admin Panel -> Settings -> General -> Items Per Page -> Map Pins -- default is 300 per page. If there are more than that many articles with addresses in the category, the map will load progressively after the page rendering (or become paginated, however you've configured Admin Panel -> Settings -> General -> Map Pin Loading Strategy).

The category map is automatically positioned and zoomed to fit all the pins, which makes it good for geographic (city/state/country) categories where articles are close to each other. If you want to force a certain minimum zoom level, use Admin -> Settings -> Tweaks Editor -> minzoom.

Search Result Maps

The "search result google map" switch adds a map to the search results page plotting the result articles. This will be on the "search articles" results page, not the "search all" results.

Submit/Edit Maps

The submit/edit maps switch enables a map during the submission/editing process so that the submitter can visually verify that their address has been geocoded correctly, and so they can drag the pin to a custom location if they so desire.

Front Page Maps

As of 8.0.0, the "front page map" switch adds a map to the front page which uses geolocation targeting (if geolocation is loaded) to show articles nearest the viewer. It will first search a 25 mile radius, and if nothing is found there will continue to expand the radius until it finds some articles to map. Note that this can be slow.





Description Enabling google maps for address-oriented items.
Rating
Views 1272 views. Averaging 0 views per day.