solved Show Googlemaps in profiles and show all profiles on one map.

musicianband
@musicianband
9 years ago
45 posts
Hi,

I have installed Googlemaps module and I am trying to show profile addresses on maps, but it seems that I am skipping something, or I am doing something wrong.

- I am using skin Media Pro 5 - Dark;
- I have updated jrCore and all modules;
- I have performed integrity check;
- I have downloaded and installed successfully Googlemaps module, licensed;
- I have activated Googlemaps module;
- I have visited the APIs Console at https://code.google.com/apis/console and logged in with my Google Account;
- I have activated the Google Maps JavaScript API v3 service;
- I have created a Simple API Browser key for my site in my Google console;
- It looks like this:

API key: xxxxxxxxxxxxxxxxxx
Referers: *yourdomain.com/*
Activated on: Feb 28, 2014 4:13 PM
Activated by: xxxxxxxx@gmail.com – me

- I have completed Global settings for GoogleMaps module as follows:

Google Maps API key: xxxxxxxxxxxxxxxxxx
Default Lat/Lng: 45.941869,24.978284 (valid values)
Default Zoom : 7
Force Static Maps : Force Static Maps
Image Mapping Modules : jrProfile,jrUser

- In Quota Config of GoogleMaps module:

apply to all quotas : yes
allowed on profile : yes
allow user choice of map type : all checked
roadmap
satellite
terrain
hybrid
allow different types of embed : all checked
place
search
directions
view
allow different types of embed : all checked
map width (default 100%)
height (default 300)
center (coordinates)
zoom
maptype (road/satellite)
travel mode (directions)
avoid (directions)
waypoints (directions)
units (directions)
directions
view

- I have saved the settings;
- I have performed Reset Cache;
- I have clicked blue button: Update profile;
- I have clicked "Create new profile";
- I have clicked "Form designer" and entered to "profile/create";
- In the corresponding field for"New field name" I have completed profile_" with "googlemaps" resulting "profile_googlemaps";
- I have created the new field by clicking on " Create New Field";
- I have edited the new field as follows:

label: location
sub label : empty
help : Googlemaps
type : googlemaps
options : empty
default : empty
validation : (string) printable characters and HTML allowed by Quota
minimum : empty
maximum : empty
display groups : (group) Normal Users
required : checked
active : checked

- I have saved the changes by clicking on "Save changes";
- I have switched from right corner, same row with Form designer, from "profile/create" to "profile/settings";
- I have edited an identical field, as follows:

label: location
sub label : empty
help : Googlemaps
type : googlemaps
options : empty
default : empty
validation : (string) printable characters and HTML allowed by Quota
minimum : empty
maximum : empty
display groups : (group) Normal Users
required : checked
active : checked

- I have saved the changes by clicking on "Save changes";
- I have clicked on my profile, from main menu;
- I have clicked blue button: Update profile;
- In "Profile", I have scrolled down to the new field "Location", where the map was showing up, and above it the corresponding field for address input;
- I have typed an address and it was suggested to me the best address match, which I have clicked;
- The map automatically centered to my chosen location;
- I have scrolled down and clicked "Save";
- The address was entered successfully into the database, and I have called it to profile page, below my online / offline status by profile_googlemaps;
- The address text displayed successfully;

I wanted to show also the map with this address on profile page, so I have performed the following actions:

- I have read the documentation, and I tried to search for "/modules/jrProfile/templates/item_detail.tpl" , but "item_detail.tpl" does not exist;
- Instead, there exists the template "item_list.tpl" ("/modules/jrProfile/templates/item_list.tpl" ) which I have tried to edit , by adding just above the footer the following smarty function: {ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"};
- I have saved the template and performed Reset Cache;
- I have clicked on my profile, but the map did not show up;
- I have deleted the smarty function from ("/modules/jrProfile/templates/item_list.tpl" ) saved the template and performed Reset Cache;
- I have looked into the skin folder, and found template "profile_item_detail.tpl", which I have tried to edit , by adding just above the footer the same smarty function: {ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"};
- I have saved the template and performed Reset Cache;
- I have clicked on my profile, but the map did not show up;
- I have deleted the smarty function from "profile_item_detail.tpl", saved the template and performed Reset Cache;

I do not know where I am doing wrong!

I would really appreciate some advice / ideas / solutions regarding this matter.

Thank You!
updated by @musicianband: 01/31/15 06:24:59PM
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
You haven't mentioned what is going wrong. Plenty of detail on what you have done, thankyou for that, but you forgot to say what is going wrong.

If you can briefley say what the problem is I might be able to help.

musicianband:
Hi,

I have installed Googlemaps module and I am trying to show profile addresses on maps, but it seems that I am skipping something, or I am doing something wrong.

- I am using skin Media Pro 5 - Dark;
- I have updated jrCore and all modules;
- I have performed integrity check;
- I have downloaded and installed successfully Googlemaps module, licensed;
- I have activated Googlemaps module;
- I have visited the APIs Console at https://code.google.com/apis/console and logged in with my Google Account;
- I have activated the Google Maps JavaScript API v3 service;
- I have created a Simple API Browser key for my site in my Google console;
- It looks like this:

API key: xxxxxxxxxxxxxxxxxx
Referers: *yourdomain.com/*
Activated on: Feb 28, 2014 4:13 PM
Activated by: xxxxxxxx@gmail.com – me

- I have completed Global settings for GoogleMaps module as follows:

Google Maps API key: xxxxxxxxxxxxxxxxxx
Default Lat/Lng: 45.941869,24.978284 (valid values)
Default Zoom : 7
Force Static Maps : Force Static Maps
Image Mapping Modules : jrProfile,jrUser

- In Quota Config of GoogleMaps module:

apply to all quotas : yes
allowed on profile : yes
allow user choice of map type : all checked
roadmap
satellite
terrain
hybrid
allow different types of embed : all checked
place
search
directions
view
allow different types of embed : all checked
map width (default 100%)
height (default 300)
center (coordinates)
zoom
maptype (road/satellite)
travel mode (directions)
avoid (directions)
waypoints (directions)
units (directions)
directions
view

- I have saved the settings;
- I have performed Reset Cache;
- I have clicked blue button: Update profile;
- I have clicked "Create new profile";
- I have clicked "Form designer" and entered to "profile/create";
- In the corresponding field for"New field name" I have completed profile_" with "googlemaps" resulting "profile_googlemaps";
- I have created the new field by clicking on " Create New Field";
- I have edited the new field as follows:

label: location
sub label : empty
help : Googlemaps
type : googlemaps
options : empty
default : empty
validation : (string) printable characters and HTML allowed by Quota
minimum : empty
maximum : empty
display groups : (group) Normal Users
required : checked
active : checked

- I have saved the changes by clicking on "Save changes";
- I have switched from right corner, same row with Form designer, from "profile/create" to "profile/settings";
- I have edited an identical field, as follows:

label: location
sub label : empty
help : Googlemaps
type : googlemaps
options : empty
default : empty
validation : (string) printable characters and HTML allowed by Quota
minimum : empty
maximum : empty
display groups : (group) Normal Users
required : checked
active : checked

- I have saved the changes by clicking on "Save changes";
- I have clicked on my profile, from main menu;
- I have clicked blue button: Update profile;
- In "Profile", I have scrolled down to the new field "Location", where the map was showing up, and above it the corresponding field for address input;
- I have typed an address and it was suggested to me the best address match, which I have clicked;
- The map automatically centered to my chosen location;
- I have scrolled down and clicked "Save";
- The address was entered successfully into the database, and I have called it to profile page, below my online / offline status by profile_googlemaps;
- The address text displayed successfully;

I wanted to show also the map with this address on profile page, so I have performed the following actions:

- I have read the documentation, and I tried to search for "/modules/jrProfile/templates/item_detail.tpl" , but "item_detail.tpl" does not exist;
- Instead, there exists the template "item_list.tpl" ("/modules/jrProfile/templates/item_list.tpl" ) which I have tried to edit , by adding just above the footer the following smarty function: {ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"};
- I have saved the template and performed Reset Cache;
- I have clicked on my profile, but the map did not show up;
- I have deleted the smarty function from ("/modules/jrProfile/templates/item_list.tpl" ) saved the template and performed Reset Cache;
- I have looked into the skin folder, and found template "profile_item_detail.tpl", which I have tried to edit , by adding just above the footer the same smarty function: {ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"};
- I have saved the template and performed Reset Cache;
- I have clicked on my profile, but the map did not show up;
- I have deleted the smarty function from "profile_item_detail.tpl", saved the template and performed Reset Cache;

I do not know where I am doing wrong!

I would really appreciate some advice / ideas / solutions regarding this matter.

Thank You!



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
A link might be useful as well.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
musicianband
@musicianband
9 years ago
45 posts
I have installed GoogleMaps module and I am trying to show profiles addresses on maps on profiles pages below the online/offline status and also have a map displayed with all profiles in profiles page from Profile menu (or in a different page, by a different *.tpl)

Maps do not show up. ( "...but the map did not show up;")

Site is http://www.muzicieni-trupe.ro

Regards
updated by @musicianband: 01/21/15 04:22:25PM
musicianband
@musicianband
9 years ago
45 posts
Problem similar to the one @indiegospel had with Events showing on map, when it had to be renamed the field. But I cannot figure it out.

https://www.jamroom.net/ultrajam/forum/new_posts/15047/google-maps-on-events

Regards
updated by @musicianband: 01/21/15 06:10:30PM
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
Heres the docs for multi-item maps:
https://www.jamroom.net/ultrajam/documentation/modules/1790/multi-item-multi-marker-maps-eg-gps-location-for-photos-in-jrgallery

Put {debug} into your template to make sure that you have the necessary variables int he template you are doing this in.

Check to see if you have any javascript errors on your page, check that you are passing in the right data for your profiles and that they have mappable data added.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
musicianband
@musicianband
9 years ago
45 posts
Hi,
I have tried what you have told me, but I cannot see anything wrong. I have provided all the steps I have performed just for you to have a clear picture and see If I did anything wrong. Can you please guide me more deeply trough this? I am not really sure for example what would be the "necessary variables" in the template. I am not sure what to look for. For example, if I want to show a map under the profile picture, what would be the script to do it? I have tried to put the script according documentation, but modifying jrBlog with jrProfile. Also, if I want to display a map with all the profiles locations on it, on profiles page (click "members" from menu) what script should I use and where to put it?
Thank you!
updated by @musicianband: 01/31/15 02:26:44PM
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
Those things are covered in the docs, you just need to read them.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
musicianband
@musicianband
9 years ago
45 posts
Ok, I'll read them one more time, and if I'll have time I'll join some classes for coding in order to use that Gmaps module. Looks there's no other way. Thanks anyway.
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
You don't need classes on coding, for most use the module is really simple to use, and the docs contain everything you need to know.

If you need to do something really custom like overlay live kml data, you will need to know the google documentation as well (there is a lot of documentation for each of the maps apis).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
musicianband
@musicianband
9 years ago
45 posts
I have read the docs, and used {debug}, I have managed to display a map with a location below members online/offline status, in description, but using this code in /skins/jrMusicianBand/profile_footer.tpl : {ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"}

I was able to find this in documentation ( http://jam.ultrajam.net/googlemaps/docs#profile-maps ) . Anyway, I have hardly tried to add this line as in documentation :

" For this example we will add the following smarty function to /modules/jrProfile/templates/item_detail.tpl, just above the footer.

{ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"}"

I have to say that "/modules/jrProfile/templates/item_detail.tpl, just above the footer" does not exist in my skin (and this is one of the reasons I have spent half an hour writing step by step what I did )

Exists only item_list.tpl, which I have tried after debugging to edit in order to display a map with all the profiles. The variable $_profile is not to be found in that template in module, and not in profiles_row.tpl, not in the other tpl I have tried to find it.

The only thing that displayed something ( a big blue map, with only one marker in default position) was in profiles_row.tpl, where I want to display it. Code was :

{ujGoogleMaps_map name="multimap" map=$item.profile_googlemaps module="jrProfile" height="300"}

But not $_items or $_items.profile or $_items.profiles or $_items.profile_googlemaps or any other variable I have tried. I have also watched the debugging explanation from video https://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug , very good explanation, but variables could not be found.

Unfortunately I do not know how to display all the profiles on one map, site-wide. There are explanations on docs for events, blogs and galleries. But not for profiles:

"Profile Maps

Some types of profile might have a location or address, for example a site or quota where each profile is a venue. In this example we will add a map for each profile and display the address and location map above the profile footer.

Go to Create Profile.......
.......result. You now have a map for each profile stored in the database.
.........

...... /modules/jrProfile/templates/item_detail.tpl, just above the footer.

{ujGoogleMaps_map name="map" map=$_profile module="jrProfile" height="300"}

It will display a nice full width map......

We can add parameters .....

{ujGoogleMaps_map ......

Site-Wide Maps

Briefly how to have a single sitewide map (not documented yet).

(not documented yet)
(not documented yet)

http://jam.ultrajam.net/googlemaps/docs#profile-maps
"

It may be very simple, but I have spent all night testing and trying to solve this, and it is a bit frustrating. It is a very nice module, good work, congratulations, but it is frustrating for somebody who is buying it to spend so much time in order to find the proper line of code by himself, considering that not everyone understands very well the complexity behind this strong, flexible and powerful platform.

Anyway, I will try more, one day I will figure it out.

Regards
SteveX
SteveX
@ultrajam
9 years ago
2,584 posts
You should use the docs on jamroom.net, not any other docs. Most people have no problems, indiegospel was unable to type in the field name in form designer - I logged into his site, typed the name in for him and it worked!

Try making a simple map as explained in the docs, then try more complicated maps once you have something simple working on your site.

Make sure you have mappable data for whatever you are trying to show on a map.

If you have made your custom field correctly, in your debug window you should be able to see an array which contains the map data (part of the profile for you). You can pass that into the map parameter of ujGoogleMaps_map. If you don't see that mappable data in debug, you can't show it on a map.

So that could be:
{ujGoogleMaps_map map=$_profile
{ujGoogleMaps_map map=$item._profile
{ujGoogleMaps_map map=$item._item
It will depend on which template you are using. Use debug, find the array with the mappable data in, and pass in that array.

As long as you have added your mappable data to that profile it will show a map.

If you see a blue map, you have mapped lat: 0 lng: 0 (which is in the middle of the ocean).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 02/01/15 06:35:30AM
musicianband
@musicianband
9 years ago
45 posts
Thank you

Regards

Tags