Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials (jReviews 2.0)
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
CSV Import for Joomla and jReviews
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 07:21:27 PM
21713 Posts in 4960 Topics by 2843 Members
Latest Member: per4mer
News: Use your client area email when you sign up to the forum so we can identify you as a trial or licensed user. Otherwise we may not answer your questions.
 
jReviews Support Forum  |  jReviews 1.x  |  Tips & tricks  |  Google maps API plugin « previous next »
Pages: [1] 2 3 ... 5
Author Topic: Google maps API plugin  (Read 20385 times)
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« on: October 31, 2006, 09:26:01 AM »

Similar to other mambots that can be run with jReviews, I think this one will be quite useful for some of you. If you try it and get it to work, please let us know. It's the Googlemaps plugin.

You just need to create a custom field for longitud (JR_LON) and latitude (JR_LAT) and then add the code in the com_content.html template:

{mosmap width='500'|height='400'|lat='{JR_LAT}'|lon='{JR_LON}'|zoom='3'| zoomType='Large'|zoomNew='0'|mapType='Satellite'| showMaptype='1'|overview='0'|text='sv DWO'|key=''}

Make sure the googlemap bot comes after the jReviews comment bot.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
jmsa2212
Newbie
*
Offline Offline

Posts: 9


« Reply #1 on: October 31, 2006, 10:11:44 AM »

Thank you for the good information!
Only draw back of this Mombots is that we have to input longitude, latitude manually. If this mambot author made built in geocode so it can convert address to GPS coordinate, it would be very useful.
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #2 on: October 31, 2006, 02:07:23 PM »

It should not be too difficult, maybe you can suggest it and donate something to the cause.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
BigDutch#2
Sr. Member
****
Offline Offline

Posts: 145


« Reply #3 on: November 01, 2006, 11:44:10 AM »

I think it will be place the map directly into the page, rather than provide a link (in place of LAT/LON reading) which the visitor will click only IF they want to see the map.  I don't want the map on the content item unless it is "requested" specifically by the site visitor

EDIT.  If map mambot is above jreviews comment bot then i get the text in the content item, if it is afterwards i get a message telling me the API wasn't registered for this site.
« Last Edit: November 01, 2006, 12:01:22 PM by BigDutch#2 » Logged
BigDutch#2
Sr. Member
****
Offline Offline

Posts: 145


« Reply #4 on: November 03, 2006, 04:05:03 AM »

 Smiley OK!

I am getting there - my problem was not entering my key in the right place.  I entered in the plugin but for some reason wasn't picking it up when the page was created so the key was missing so i entered my key directly into the "com_jreviews/tmpl/default/com_content.html" page :

{mosmap width='500'|height='400'|lat='{JR_LAT}'|lon='{JR_LON}'|zoom='3'| zoomType='Large'|zoomNew='0'|mapType='Satellite'| showMaptype='1'|overview='0'|text='Located Here'|key='MY-KEY-GOES-HERE'}

Now i want to replace "Located Here" with the content title and maybe another field or two but if i enter |text='{title}'| it doesn't work - how do i get my content item into the mosmap text ?

Problem 2
 i don't want the map to be given space on the page if the LON + LAT are blank otherwise i get a large white space of 500x400 pixels just under the main text ?

Nice To Have
Ideally i`d like to create a hyperlink to the googlemap in place of the LON/LAT fields in the content item - is this possible ?
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #5 on: November 03, 2006, 06:28:45 AM »

Keep in mind that this is non-jReviews supported. But I think it's a great addition and will help others.

#1: The title is not a field you can use in the template. You could create a custom field for title (repeat it basically). Variables in templates need to be in UPPERCASE, so even if title were valid, which it's not it would have been {TITLE}. If you can wait I will add it to the next version.

#2: http://www.reviewsforjoomla.com/component/option,com_smf/Itemid,34/topic,455.0/

#3: I don't know, that's for you to figure out with the google service. The link can be created using the address per #2, it might be possible to do it with lon/lat as well.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
BigDutch#2
Sr. Member
****
Offline Offline

Posts: 145


« Reply #6 on: November 04, 2006, 07:19:47 AM »

1) seems pointless to duplicate a field !!!  Thats what relational databases are for !  I`ll wait until you add the field to the relevant query

2) I got that working fine but can't get the link to NOT display if the field is empty :

<a target="_blank" href="http://maps.google.com/maps?q={JR_LATLON}">Get Directions and Map It</a>
<patTemplate:tmpl name="googlemaplink" type="simplecondition" requiredvars="jr_latlon">
<a target="_blank" href="http://maps.google.com/maps?q={JR_LATLON}">Get Directions and Map It</a>
</patTemplate:tmpl>

3) I think you misunderstand !  I want the hyperlink in (2) to replace the actual LON-LAT custom field in the content record, but i guess i could "hide" the field entirely ?
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #7 on: November 04, 2006, 07:26:03 AM »

#1 It has nothing to do with relational databases and more with the fact that I keep adding features, not available when you purchased just to make you happy Smiley. I already added this to the next version.

#2 You should not repeat the link code outside the patTemplate tags, so get rid of that. Then, if you are using jReviews version 1.2, you need to add the useGlobals="true" to the patTemplate. Read the thread I referred you to. You are almost there.

#3 Ok, yes, just hide the fields from the fields manager. That's why I added that option, so if you wanted to do custom stuff you didn't have to show it twice.

Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
BigDutch#2
Sr. Member
****
Offline Offline

Posts: 145


« Reply #8 on: November 04, 2006, 07:38:11 AM »

#1 ok - its GREATLY appreciated - i will remember you when i make my first million !  Cheesy

#2 all done - just need to work on the URL to get correct ZOOM and Satellite image as default.

#3 done

I've got the MOSMAP thing working as well just can't decide on best course of action !
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #9 on: November 04, 2006, 07:41:06 AM »

Can you post the structure of the final url you use and explain the parameters? For example, what is inside your {JR_LATLON} variable?

Also, please post the final code you are using for the link so other's can just copy it!
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Harrison
Full Member
***
Offline Offline

Posts: 59


« Reply #10 on: November 11, 2006, 08:36:42 AM »

I've been interested in using Google maps for visitor location on my site for some time.

Another great component that using Google Maps to mark visitor and member locations is called GeoCommunity.  I was involved in the beta testing of this component and it now works very well at automatically placing the locaion of visitors on the map.  And for members it works nicely with Community Builder to link members locations to their profiles and shows their name, location and avatar on the map.

It also has a sister module called GeoVisitor which just plots visitor locations on a map.

This may not be of use for what you are trying to do, but I thought it might be of interest as it uses an IP location server to automatically find the location of visitors and places them on the map, as well as having the ability to manually alter you location to make it more accurate, or to manually add your location if your IP wasn't found when the mambot tried to reference and look it up.
Logged
simplesimon
Newbie
*
Offline Offline

Posts: 2


« Reply #11 on: March 19, 2007, 07:15:26 PM »

Hi,

I'm new to JReviews and struggling with googlemap API as posted by jReviews.
I've set up customed fields, pasted the code in template and checked the order etc...
I get nothing... Angry

I wondered if I needed to add more to the template...

Many thanks in advance

 Wink

Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8613


« Reply #12 on: March 19, 2007, 11:44:41 PM »

What do you mean you get nothing? Have you tried entering the code with hardcoded numbers instead of the {JR_LON} {JR_LAT} tags to see if it works?

What did you name your custom fields? Also try just putting the above tags without the rest of the google map mambot code to check if you see the values in the template.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
simplesimon
Newbie
*
Offline Offline

Posts: 2


« Reply #13 on: March 23, 2007, 06:17:46 PM »

Hi,

Thanks for the response. I got a white space....

Tried as suggested hardcoded numbers and it worked fine.
Tried with custom fields again and worked.

I think I must of missed a ' or something...





Logged
CG
Jr. Member
**
Offline Offline

Posts: 43


« Reply #14 on: April 20, 2007, 06:42:39 AM »

I'm having a similar problem.  Of course it is late and I might be missing something but here is what I have tried:

In a regular Joomla content item I inserted the following code:

Code:
{mosmap width='500'|height='400'|address='375 University Avenue, Palo Alto, CA, 94301, US'|zoom='4'|zoomType='Large'|zoomNew='1'|mapType='Hybrid'|showMaptype='1'|overview='1'|key='myLongGoogleAPIkey}

and the map displays ok.

In JReviews I have the following custom fields:

     jr_address
     jr_city
     jr_state
     jr_zipcode

and I insert the following code into - com_content.html:

Code:
{mosmap width='500'|height='400'|address='{_JR_ADDRESS},{_JR_CITY},{_JR_STATE},{_JR_ZIPCODE},US'|zoom='5'| zoomType='Small'|zoomNew='0'|mapType='Normal'|showMaptype='1'|overview='0'|key='myLongGoogleAPIkey'}

But it will not display, only a big white space.

If I use Long & Lat without the custom fileds it also shows.

Any ideas on what I might be doing wrong?

Thanks in advance.
« Last Edit: April 20, 2007, 06:44:27 AM by CG » Logged
Pages: [1] 2 3 ... 5
« previous next »
    Jump to: