DataTables with Googlemaps displaying

DataTables with Googlemaps displaying

citizencitizen Posts: 2Questions: 0Answers: 0
edited March 2011 in General
Hello team, the forum,

DataTables is a superb program, and I thank you very much for the work, God bless you ;-)

I use the data stored in a mysql database, and sql file type line is as follows:

(1, "Adrar", "Adgha", "01001", 27.98224, -2.06994, "\{mosmap width='400'\|height='400'\|lat='27.98224'\|lon='-2.06994'\|show='0'\|zoom='7'\|zoomType='Large'\|zoomNew='1'\|lightbox='1'\|lbxwidth='900px'\|lbxheight='600px'\|lbxzoom='7'\|align='center'\|centerlat='27.98224'\|centerlon='-2.06994'\|mapType='Map'\|showMaptype='1'\|showScale='1'\|overview='1'\}"),

In the last column, I should have a link opening Googlemaps lightbox zooming on correspondent city, but the problem is that in this column it is the entire code that is displayed instead of the link,

my page :

http://sd-1.archive-host.com/membres/up/779983057/datatable_176.gif

Dooglemaps web page :

http://tech.reumer.net/Google-Maps/Demo-Google-Maps/map-with-lightbox.html

Example of what I wish to make with DataTables and Googlemaps :

http://www.geopostcodes.com/index.php?pg=browse&grp=1&sort=1&niv=4&id=5263&l=0

Joomla article code :
[code]



DataTables example

@import "http://www.website.fr/tools/data_table_1.7.6/css/demo_page.css";
@import "http://www.website.fr/tools/data_table_1.7.6/css/demo_table_jui.css";
@import "http://www.website.fr/tools/data_table_1.7.6/css/jquery-ui-1.8.4.custom.css";




$(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://www.website.fr/tools/data_table_1.7.6/server_processing.php",
"oLanguage": {
"sUrl": "http://www.website.fr/tools/data_table_1.7.6/language/fr_FR.txt"
}
});
} );






Wilaya
Commune
C.P.
Latitude
Longitude
Localisation




Loading data from server




Wilaya
Commune
C.P.
Latitude
Longitude
Localisation




[/code] I have also an other problem, the program works on FireFox but not on Internet Explorer,

Cordialy, Hafid.

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    With the data showing in the table, I would recommend using fnRender to 'render' the display string as you need: http://datatables.net/usage/columns#fnRender

    Also I would recommend dropping the "http://www.website.fr/" and replacing it with just "/" (assuming your site is http://www.website.fr/ - otherwise you might run into XSS issues. This might be the IE problem it might not. What about it isn't working in IE?

    Allan
  • big-dealbig-deal Posts: 38Questions: 0Answers: 0
    I think that your problem is much simpler than you think.
    The data that you send is a text - not a link. that's why it is displayed as a text and not as a link.
    You should change your server side code to send something like:
    [code]
    (1, "Adrar", "Adgha", "01001", 27.98224, -2.06994, "show map"),
    [/code]

    In other words, wrap your link - in an html link code:
    [code]
    some desc. text
    [/code]

    big-deal.
  • citizencitizen Posts: 2Questions: 0Answers: 0
    Good evening the forum,

    thank you Allan for your advice, the link dropping solved problem with IE,

    thank you big-deal for your tip, I've tried it but it didn't work, the “show map” behaves as a link (colour change and underline) but not possible click,

    Mike Reumer, Googlemaps developer, said to me the problem is that the table is loaded dynamically and not generated by php on the server, and Googlemaps plugin only works on the webserver and not at the client,

    Cordially, Hafid.
This discussion has been closed.