GoogleMaps Module [NEW VERSION 3.0, 2009-02-22]

Get help with installation and running official modules for phpwcms here. Please do not post bug reports or feature requests here.
breitsch
Posts: 473
Joined: Sun 6. Mar 2005, 23:12
Location: bern switzerland

Re: GoogleMaps Module [New Version]

Post by breitsch »

kivipea wrote:I'm running 4.4.0, but yes, bcmath extension is disabled. Thanks for pointing this out.
But GM module seems to work properly also w/o bcmath. What functionality is actually contained in this 2 lines?
It works properly until you use a special icon (not the default one) then it throws an error and does not display the icon.
To solve this without changing the php settings you can do as follows:

in cnt.article.php

find (should be row 40):

Code: Select all

$content['googlemaps'] = array();
add before

Code: Select all

if(!function_exists("bcdiv")){ 
  function bcdiv($first, $second, $accuracy=2){
    $res = $first/$second;
    return round($res, $accuracy);
  }
}
http://www.youtube.com/watch?v=jqxENMKaeCU
because it's important!
breitsch
Pele
Posts: 22
Joined: Thu 17. Nov 2005, 09:36

Re: GoogleMaps Module [New Version]

Post by Pele »

...
in cnt.article.php

find (should be row 40):

Code: Select all

$content['googlemaps'] = array();
add before

Code: Select all

if(!function_exists("bcdiv")){ 
  function bcdiv($first, $second, $accuracy=2){
    $res = $first/$second;
    return round($res, $accuracy);
  }
}
Yes - it works - with this little change in cnt.article.php! Thank You Breitsch!
regards
Pele
User avatar
axelko
Posts: 138
Joined: Mon 27. Feb 2006, 22:51
Contact:

Re: GoogleMaps Module [New Version]

Post by axelko »

I had the same problem but with the default marker (phpwcms1.3.5 5/12/08). When I activated in the contentpart '[x] show marker', I just got a blank screen. In my error log there was an error message :
[error] [client 999.999.999.999] PHP Fatal error: Call to undefined function bcdiv() in /home/virtual/site47/fst/var/www/html/furniture/include/inc_module/mod_googlemaps/inc/cnt.article.php on line 151, referer: http://www.domain.tld/furniture/index.php?home-nl
The solution above worked like a charm.
Greetz,

Axel
-------------------------------
Keppn
Posts: 80
Joined: Wed 14. Jul 2004, 18:16

Re: GoogleMaps Module [New Version]

Post by Keppn »

breitsch, thank you for this great module! It's easy to use, good to handle, and even documented - very well done.

I do have some additional ideas:
- Wouldn't it be great, if the module allowed to show all entered adresses as a list beneath the map window?
A click on one of these adresses would then center and zoom the map window to the clicked point.
- A search bar, which returns the nearest entered point according to the search query would also be great.
For example, if I searched for a speficic shop in the area of 33885, the module would show the nearest
point, but only out of the list of entered adresses (which could be 33886).
- When making lots of entries in the backend, it would be comfortable to have a "copy"-function similar to
regular articles.

Thanks again, keep up the great work!
User avatar
Dan-G
Posts: 50
Joined: Fri 11. Apr 2008, 12:14

Re: GoogleMaps Module [New Version]

Post by Dan-G »

wow Breitsch, just had my first look at this mod - amazing stuff.
Keppn wrote:Wouldn't it be great, if the module allowed to show all entered adresses as a list beneath the map window?
A click on one of these adresses would then center and zoom the map window to the clicked point.
For me, this is a great suggest and something I would love to see implemented.

To have address, title, wysiwyg description etc below the map and be able to list them with template control would be fantastic. I tried to achieve something similar by creating articles in the article center and using SHOW_CONTENT in the module but this was problematic.

It would also be great to have a search function that works only for the entered addresses.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: GoogleMaps Module [New Version]

Post by update »

this is existing already: search within entered addresses, list addresses, click items on a list and display the related information within the map...
But because it isn't a module it isn't published (sort of too many problems to handle it for the overall user yet)
PM me and I'll show you ;)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
breitsch
Posts: 473
Joined: Sun 6. Mar 2005, 23:12
Location: bern switzerland

Re: GoogleMaps Module [New Version]

Post by breitsch »

This will come as part of the updated module
I'm working on it right now
there will be these changes to the current module:
- routeplanner-form within the InfoWindow (as tab or as 2nd layer), route is displaed on the map and the Route entries are listed beneath/left/right the map
- search function with listing of results left/right/beneath the map or as RT
- routeplanner, searchresults, categories selection in tabs so they can work together (select category then search in this category only)

everything can be set up with a few clicks in backend.

Some other requests?
http://www.youtube.com/watch?v=jqxENMKaeCU
because it's important!
breitsch
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: GoogleMaps Module [New Version]

Post by update »

You are heroically striking again :D thanks a lot!
breitsch wrote:Some other requests?
- possibility to limit search within active entries / inactive /deleted ones
- printable route planner (right now I do a print version first and then the calculation, otherwise the calculated route is lost (print function of phpwcms)
- my "extended search" integration: random within distance, show all within distance (or a fraction of it)
- possibility to sort categories when displayed in frontend (problem now: when listing all countries of germany and then adding france or belgium this will be mixed...
- possibility to do a printout of search results (right now I fiddled together some JS mark and print popup, it's working but could be done better ;)

---> me totally exhausted now but I have more :lol:
Last edited by update on Thu 5. Jun 2008, 20:11, edited 1 time in total.
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
sustia
Posts: 651
Joined: Fri 2. Apr 2004, 22:29
Location: Lecce (Italy)
Contact:

Re: GoogleMaps Module [New Version]

Post by sustia »

Hi breitsch, just a simple question.
The module will be a "real" module?
I intend that it can be installed without making changes to the file phpwcms.php?

Thanks.
Campeones del mundo!
Vegetables!
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: GoogleMaps Module [New Version]

Post by update »

...and while we are at it now:
- possibility to show the same custom pages within the search result map too, not restricted to the big map alone)
- and this little routeplanner link aiming at the internal search from within map and search map

- and the possibility to enter an @ in the BE when writing the content (right now one single @ will blow up the complete map - nothing serious, but sometimes you forget to change it into "att"...this is the case with my installation at least))
Last edited by update on Thu 5. Jun 2008, 20:31, edited 2 times in total.
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: GoogleMaps Module [New Version]

Post by update »

I intend that it can be installed without making changes to the file phpwcms.php?
this certainly will be the case as is with the actual module right now :D
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
360fusion
Posts: 120
Joined: Wed 30. Aug 2006, 01:15
Location: Yarm, UK
Contact:

Re: GoogleMaps Module [New Version]

Post by 360fusion »

Will it be possible to display results based on categories?

something like this: http://www.thesarasotamls.com/gmap.php

so users can filter down the results to their specific requirements.

Ben
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: GoogleMaps Module [New Version]

Post by update »

360fusion wrote:so users can filter down the results to their specific requirements.
yes - very cool ('ve been thinking of it too, but did forget again :) )
Thanks for pulling it up again :D
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
sustia
Posts: 651
Joined: Fri 2. Apr 2004, 22:29
Location: Lecce (Italy)
Contact:

Re: GoogleMaps Module [New Version]

Post by sustia »

claus wrote:
I intend that it can be installed without making changes to the file phpwcms.php?
this certainly will be the case as is with the actual module right now :D
Great! :D
Campeones del mundo!
Vegetables!
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: GoogleMaps Module [New Version]

Post by update »

Today is my sitemap day ;)
And googles webmaster tools spit an error on my submission of the kml:
Unsupported file format
Your Sitemap does not appear to be in a supported format.
I've compared it with what google thinks that would be valid and I haven't been able to detect any discrepancies, so to say.
But something must be nissed....
Here is the kick off of my kml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
  <kml xmlns="http://earth.google.com/kml/2.1">
    <Document>
    <Placemark>
      <name>Any Peter</name>
      <description><![CDATA[<p><b>urgently wanted<br />
....
Is it missing perhaps some

Code: Select all

<name>BalloonStyle.kml</name>
  <open>1</open>
  <Style id="exampleBalloonStyle">
    <BalloonStyle>
      <!-- a background color for the balloon -->
      <bgColor>ffffffbb</bgColor>
      <!-- styling of the balloon text -->
      <text><![CDATA[
      <b><font color="#CC0000" size="+3">$[name]</font></b>
      <br/><br/>
      <font face="Courier">$[description]</font>
      <br/><br/>
      Extra text that will appear in the description balloon
      <br/><br/>
      <!-- insert the to/from hyperlinks -->
      $[geDirections]
      ]]></text>
    </BalloonStyle>
  </Style>
after the opening <Document> tag?
Breitsch, If you are around, do you have some hint how to proceed? That would be great...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply