Home arrow Test arrow Using Google maps with Jreviews
Using Google maps with Jreviews PDF Print E-mail
Written by Mike Reumer   
Friday, 13 July 2007
This is documentation how to use Googlemaps Plugin with Jreviews to display maps of custom fields. You ave several option:

  • Use Lon & Lat
  • Use an address

Notes:
  1. Make sure the Googlemap plugin comes after the jReviews comment bot.
  2. Disable the click2search feature as this can break the code.
  3. Insert the code in the com_component.html template, anywhere in between the patTemplate tags.
  4. JR_xxx variables ARE case sensitive.
This documentation is provided by Stewart Christian. There is also a discussion at JReviews support forum .

Using Lon & Lat

If geocoding is available in a country then you can use an address.

Create a custom field for longitude (JR_LON) and latitude (JR_LAT).  These contain the latitude and longitude values

Add the code in the com_content.html template of Jreviews:
 
{mosmap width='500'|height='400'|lat='{JR_LAT}'|lon='{JR_LON}'| zoom='3'| zoomType='Large'|zoomNew='0'|mapType='Normal'| showMaptype='1'|overview='0'} 

Using an address

Create a custom field for your address. It is best to use a different field for each parameter of the address so parameters can be added as needed.  An example is :
 
For US,
     JR_ADDRESS
     JR_CITY
     JR_STATE
     JR_ZIPCODE
 
For UK
     JR_STREET
     JR_TOWN
     JR_COUNTY
     JR_POSTCODE
 
Add the code in the com_content.html template of Jreviews:
 
{mosmap width='400'|height='300'| address='{JR_ADDRESS},{JR_CITY},{JR_STATE},{JR_ZIPCODE},US'| zoom='5'| zoomType='Large'|zoomNew='0'|mapType='Normal'|showMaptype='1'|overview='0'}
 
or
 
{mosmap width='400'|height='300'| address='{JR_STREET},{JR_TOWN},{JR_COUNTY}'| zoom='5'| zoomType='Large'|zoomNew='0'|mapType='Normal'| showMaptype='1'|overview='0'}
 
{mosmap width='400'|height='300'|address='{JR_POSTCODE}'| zoom='5'| zoomType='Large'|zoomNew='0'|mapType='Normal'| showMaptype='1'|overview='0'}
Last Updated ( Saturday, 12 April 2008 )
 
< Prev   Next >

Search

Google

Advertisement