Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[NEW PLUGIN] GoogleMapByCat v1

(Page 1 of 3)
> >
Quote Reply
[NEW PLUGIN] GoogleMapByCat v1
Hi,

I'm pleased to announce the release over GoogleMapByCat Smile

More details: http://www.ultranerds.com/...GoogleMapByCat_L264/

Price: $50

This is also part of the ULTRA Package PRO deal.

Whats this plugin do?

This plugin will let you show a map of the links in your category, assuming they have an address set for their listing. NOTE: This plugin requires the GoogleMap plugin, as that is where the long/lat values are grabbed from. This simply adds an extention to that plugin, so you can show the map on your category pages.

Features

  1. Very simple to setup
  2. Lets you show the map on ANY category page (you can enable/disable specific categories, if the list is too long - as that can sometimes slow down your users download times)
  3. You can set custom long/lat location per category, as well as the zoom level (this is handy, if your categories are country related - as you can zoom in at different levels per category, on different locations)
Screenshots

There is an example screenshot here: http://www.ultranerds.com/...GoogleMapByCat_L264/

If you have any questions, please don't hesitate to ask.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi Andy,

I'm having fun with this. I've now got a nice hover effect working on the markers based on this example;
http://econym.googlepages.com/mouseo.htm

If anybody is interested, this plugin is proving very popular with my users and can be seen working here;
Stagelink Scenery Suppliers

Cheers,

Piers
Quote Reply
Re: [Piers1] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

Glad to hear its working well for you :)

Quote:
I'm having fun with this. I've now got a nice hover effect working on the markers based on this example;
http://econym.googlepages.com/mouseo.htm

Ah cool - its a little bit of a PITA when you have to actually "click" on a flag with the current system, to make it show the box. Hopefully that'll work well for people if they use it Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
How do I put an individual GoogleMap popup link for each listing in the links.html page?
Quote Reply
Re: [Sies] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

What do you mean? A link in link.html, which makes a pop-up box appear, with the google map in it?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
I want a link like this
http://econym.googlepages.com/mouseo.htm
I want to place it next to a linkowners address, so a user can click this link a view a GoogleMap with a marker for only that address.
Quote Reply
Re: [Sies] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

Try linking this in link.html;

Code:
<a href="javascript:void(0)" onclick="window.open('<%config.db_cgi_url%>/page.cgi?p=google_map;ID=<%ID%>','map','width=300,height=200,menubar=yes,status=yes,location=yes,toolbar=yes,scrollbars=yes')">View Map</a>

..then, make a new template called "google_map.html". Put the following code in it:

Code:
<%load_link_details($ID)%>
<html>
<head>
<title>Map for <%Title%></title>
<body>
<%Plugins::GoogleMap::LoadMap($ID)%>

<%-- START GOOGLE MAP STUFF --%>

<%if LongVal%>

<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2.x&key=<%API_Key%>"></script>

<style>.gmap {
margin: 0px;
padding: 0px;
}

.middleColumn {
margin: 0px;
padding: 0px;
}</style>

<div align="center" style="padding: 10px 10px 10px 10px;">

<div id="ForumMembers_mapdisplay" style="width: 500px; height: 300px" class="gmap display"></div>

</div>

<script type="text/javascript">

//<![CDATA[

if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("ForumMembers_mapdisplay"));
var center = new GLatLng(<%LatVal%>,<%LongVal%>);

map.setCenter(center, 15);
map.enableContinuousZoom();
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());


m0 = new GMarker(new GLatLng(<%LatVal%>,<%LongVal%>));
GEvent.addListener(m0, "click", function() {
m0.openInfoWindowHtml("<h2>fff</h2>");
});
map.addOverlay(m0);

}
else {
alert("Your browser is not compatible with the mapping tool.");
}
//]]>
</script>

<%endif%>

<%-- END GOOGLE MAP STUFF --%>
</body>
</html>

Now, you need to make a new global - called "load_link_details", with the following code:

Code:
sub {
my $link = $DB->table('Links')->select( { ID => $_[0] } )->fetchrow_hashref;
return $link;
}

Hopefully that'll do the trick Smile

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
I've added this to my site but cant seem to get it working correctly:

If I add Lat /Long coordiantes + zoom level for UK, the map appears to default to a location showing 'blue' with a location somewhere in the Indian ocean?

I've tried various lat / long coordinates but they make no difference?

any help /advice please?

PS. I like the 'mouse over' effect implemented by Piers1
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

I'm actually working on a function ATM, which will let you enter an address, and get a long/lat value returned.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

Please try version 1.1, which is now available from our Members Area.

It has a new function in the admin panel, called "Find a long/lat for place". In your example, enter "Scotland", and it should get the correct values for you (you will most likely wanna play around with the zoom level, as the long/lat value you will get, will be for pretty much the center of scotland =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
I've installed v1.1 and used the tool to get these lat / long for Scotland:

Long: -4.2026459999999997
Lat: 56.490670999999999

I've modified the scotland category using these + zoom level of 14

The map still shows 'indian ocean' when viewing the scotland category page
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

Sorry, my mistake. I put the long/lat values back to front. If you reversed those values, then that would be the correct place =)

I've just uploaded a fixed version (still 1.1), and that can be downloaded from the Members Area. I've also updated the "Scotland" category for you, and its all showing fine now. NB: I wouldn't use that level of zoom, as thats aimed at REALLY zooming in (i.e street level, not a whole country =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Do I need to upload the 'revised' v1.1 plugin or did you upload it to my site?
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
You will need to =)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
OK, uploaded new v1.1

Appears to work OK, just 1 comment: I used the lat / long tool to get co-ordinates for Bodmin, Cornwall

Long: 50.471296000000002
Lat: -4.7176130000000001

It gave the correct lat long but with 'labels' mixed wrong way round...the correct labeling would be:

Lat: 50.471296000000002
Long: -4.7176130000000001

It works ok if you 'follow' the values + labels, exactly as shown

But if somebody else using this plugin doesnt know about this labelling it opens up the possibility for confusion.

Is this easily changed in your plugin as it might prevent others asking about this in the future?
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

Sorry, not sure what you mean?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
The labels are 'wrong way round', its ok if you know they are or if you are not familiar with Lat / Long coordinates...and just use the plugin without question...but if you know about Lat / Long, and start using this plugin, 'without prior knowledge' of the way this plugin is labeling Lat / Long then it might cause a little confusion for 'new users'

This is just a quick reminder for anybody regarding Lat / Long.

Latitude is the term / label for the measurement system used when used for cooridinates, this is measured in degrees from the equator.

The equator is 0 degrees, any line of latitiude North or South of the equator is given a + or - value: UK mainland range from 50.000 upto 58.65

John O'Grotas Scotland = 58.64, -3.08
Lizard, Cornwall = 49.98,-5.20

Longitude: this is the term / label for the measurement system used when used for cooridinates, this is measured in degrees from Grenwich (London)

Grenwich is 0 degrees, any line of longitude East or Westof the equator is given a + or - value: UK mainland locations range from: 1.74 to -5.20


regards
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Ok, I see what you mean now. Will check it out later.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
I've uploaded a new version of 1.1 to the Members Area. This should have the "mix up" of the long/lat values sorted now (you will need to install this new version, *as well* as updating some bits in your templates (as per the readme)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Andy

some of the 'google maps' are not showing correct location:

see this example: http://www.bookbedandbreakfast.com/...e/Annaclone_147.html

I've tried variations of the address in the database fields, but they all return the 'US location' seen in the example.

Any ideas.

thanks
Colin Thompson
Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
New version of GoogleMapsByCat

you refer to: " updating some bits in your templates (as per the readme) "

I've downloaded from members area, then uploaded to my site, then installed and checked the 'read me' but couldnt see any 'changes' for the templates;

previous code for category.html:

<%if GoogleLong and GoogleLat and GoogleMapZoom%>
<%Plugins::GoogleMapForCat::Get_Map_Details($category_id,$GoogleLat,$GoogleLong,$GoogleMapZoom)%>
<%endif%>

This is the code from revised 'read me' file:

<%if GoogleLong and GoogleLat and GoogleMapZoom%>
<%Plugins::GoogleMapForCat::Get_Map_Details($category_id,$GoogleLat,$GoogleLong,$GoogleMapZoom)%>
<%endif%>

I cant see any changes?

Do I need to change anything?

regards
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
I've just added lat / long to Padstow category: http://www.bookbedandbreakfast.com/...l/Padstow/index.html

I didnt make any changes to the 'category' template, appears to work ok.

do I need to make any changes?
Colin Thompson
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
Hi,

Sorry, my mistake - no changes needed in category.html :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
colintho wrote:
Andy

some of the 'google maps' are not showing correct location:

see this example: http://www.bookbedandbreakfast.com/...e/Annaclone_147.html

I've tried variations of the address in the database fields, but they all return the 'US location' seen in the example.

Any ideas.

thanks

I'll check into that in a bit.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1 In reply to
colintho wrote:
Andy

some of the 'google maps' are not showing correct location:

see this example: http://www.bookbedandbreakfast.com/...e/Annaclone_147.html

I've tried variations of the address in the database fields, but they all return the 'US location' seen in the example.

Any ideas.

thanks
Hi,

The problem seems to be more with your address =) If you open Google Earth, and enter:

Marine Drive, Hannafore, Cornwall, PL13 2DH, England

..it doesn't find it, but it does come up with:

Hannafore Rd, Looe, Cornwall PL13, UK
..and:
Hannafore Ln, Looe, Cornwall PL13, UK

You need to just update the address accordingly, as I have now done for you (I've set it as Hannafore Rd, Looe, Cornwall PL13, UK, so just change to "Hannafore Ln", if I selected the wrong one =))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
> >