PostNuke: A Flexible Open Source Content Management System
home | forum | international support | contact us

Archive

Google Maps in PostNuke - weblinksmap released

By: mosabua (mosabua) 2006.04.23

So your web site talks a lot about travelling and has photos about all sorts of places? And you would like to link to all those resources on a map. Well, with weblinksmap we got just the right hack for you.

weblinksmap.php allows for the display of web links from PostNuke to be displayed in a Google Map in the PostNuke center frame. It takes links from the weblinks module and uses a custom markup of the coordinates in the description to sort out latitude and longitude. Check out a map on our site, read more about it in the description and download it.

We already suggested the introduction of longitude and latitude fields in the weblinks core module.

Enjoy the hack

Manfred

Print this | Send this | Hits: 0 |

19 Comments so far

(Latest comments )

spadata1's Avatar

1. spadata1 wrote on Apr 24, 2006 at 12:14 AM

IE6 Winxp-pro w/latest security --- "IE was unable to open the website at URL xxxxxxx.... Operation aborted"



I can get the rest of your web site just refuses to open those links with the map?
Slugger's Avatar

2. Slugger wrote on Apr 24, 2006 at 12:54 AM

Same with Safari.

edfel's Avatar

3. edfel wrote on Apr 24, 2006 at 02:30 AM

Hi:



Works with Netscape 8. I guess it should work with MOzilla too. IE shows a nasty error tou...



Interesting work that can be expanded!!



NIce.



icon_smile
spadata1's Avatar

4. spadata1 wrote on Apr 24, 2006 at 03:21 AM

Paid a visit with FireFox ... GREAT module ... now if we can get it working for Internet Eplorer ....



I wonder what is blocking the link? The warning/error message said nothing.
mosabua's Avatar

5. mosabua wrote on Apr 24, 2006 at 04:01 PM

Sorry for not testing with IE. I am running Linux at home icon_wink Anyway .. I fixed the issue. Works now. Download a now version at the same location icon_wink
Chestnut's Avatar

6. Chestnut wrote on Apr 25, 2006 at 03:55 PM

Nice,



I will work on it tonight or in the coming days to encapsulate this into a simple module if you are interested. Although I won't make it use the Weblinks for that.



FC !
KimEng's Avatar

7. KimEng wrote on Apr 26, 2006 at 02:27 PM

I tried to install the newest weblinksmap.php and it is still not working on my computer. I am using IE, Win XP pro, apache server and the new .762 PostNuke.

I wonder if the Call to google is not from my root dir since it tells me the key is not valid.
mosabua's Avatar

8. mosabua wrote on Apr 26, 2006 at 02:36 PM

You have to get a valid google key for your domain. So if you run it at home that has to be your machine name or localhost or whatever the local IP number is that you use to access the website. This is a restriction from Google. Once you got the key you have to insert it in the weblinksmap as you can read in the instructions on my site.

mosabua's Avatar

9. mosabua wrote on Apr 26, 2006 at 02:38 PM

Sure. Feel free to do that. Ultimately I think it should be part of the weblinks module but a separate module makes sense too. I just don't know enough about writing my own module and do not have to time to learn it (not that it would be a problem). Let me know how things go.

Chestnut's Avatar

10. Chestnut wrote on Apr 26, 2006 at 03:02 PM

The reason I would not link the module to Web links is that having coordinates as part of a links does not make sense in 90% of the situations a Web links mod could be used in.



For the moment, I made a tiny table to save coordinates from registered users that add themselves to the map with their userid. In the long term, this could be changed to fetch the coordinates from the Dynamics user data...



... or from elsewhere... like the Web_Links. Next Web_links being pnAPI-pnRender, it will be a breeze to make a hook for the mod to use it.



icon_wink

FC !



P.S. : Preview or release this weekend probably.
chaKal's Avatar

11. chaKal wrote on Apr 27, 2006 at 01:05 PM

Hi,



Do you use GoogleMapAPI ?

http://www.phpinsider.com/php/code/GoogleMapAPI/



There is some examples to use it with Smarty.

So with this library it is possible to include Google maps in pnRender templates (for example with Pagesetter).



chaK!

mosabua's Avatar

12. mosabua wrote on Apr 28, 2006 at 03:57 AM

No. I am using the google maps API directly. No need to wrap it as far as I am concerned.
mosabua's Avatar

13. mosabua wrote on Apr 28, 2006 at 03:59 AM

Hm... so with this approach you could attach coordinates to all sorts of stuff. e.g. users, stories, weblinks and more.. that would be ideal!
Chestnut's Avatar

14. Chestnut wrote on Apr 28, 2006 at 12:59 PM

On the long term, yes... for this weekend, it will simply have the uid and the coords...

icon_wink



FC !
Chestnut's Avatar

15. Chestnut wrote on Apr 28, 2006 at 01:09 PM

No real need of the Google API class...

First draft here : Here



icon_wink

FC !
moremojo's Avatar

16. moremojo wrote on Apr 28, 2006 at 05:15 PM

Did u see this one already?:
Pagesetter Google Maps template
lordofportals's Avatar

18. lordofportals wrote on May 01, 2006 at 03:26 PM

Your module has a number of interesting elements that would work with a project that I am working on. I worked with FEMA on Hurricane Katrina last year. One of our biggest challenges in the field is keeping track of resources, ie. Red Cross shelters, Disaster Recovery Centers, Points of distribution for food and water and last but not least actual locations of evacuees and damaged property. To assist in that effort I began to develop a system to track resources on a near real time basis. We started out using MS Streets and Trips. We would feed in addresses and then equate them to coordinates. Later we began using Google Earth. You can see the project at http://www.e-beams.com The Programmer that was assisting me was not familair with PN so he coded it using HTML.

Now to my question! Using your module how difficult would it be to write a front end that would feed GPS coordinates into the data base along with identifying information concerning the Waypoints?
Chestnut's Avatar

19. Chestnut wrote on May 06, 2006 at 01:04 PM

lordofportalUsing your module how difficult would it be to write a front end that would feed GPS coordinates into the data base along with identifying information concerning the Waypoints?


I am slowly enhancing the module on my dev site to add special markers but I won't probably go that far as to create polylines and waypoint stuff.

But as all or most of the information is within the template, the output can of course be easily tweaked to your needs.
icon_wink

Main Menu

Extensions Database

Documentation

Development

Login





 


 Log in Problems?
 New User? Sign Up!

Donate to PostNuke