[Map Module 0.5.1d + history code breaks Safari]
|
floridave
![]()
Joined: 2003-12-22
Posts: 26100 |
Posted: Sun, 2006-05-28 20:19
|
|
Map Module 0.5.1d + history code breaks Safari I am having trouble getting the Safari browser to work. I don't have a Mac and use: It seems that my history code is screwing things up. Reverting to the unmodded version seems to work. Dave |
|


Posts: 1894
I have a MAC OSX Vmware instance. I'll do some test
I also had installed the developpers tools so I should be able to find out what's wrong .... I'll let you know !
-------------------------
The Termite
Posts: 1894
PS: the latest SVN does the same thing

-------------------------
The Termite
Posts: 26100
I think I found the issue:
// ================= mapMoved LISTENER ============= // ======= add history links to the div_history ==== GEvent.addListener(map, "moveend", function mapMoved() {to:
// ================= mapMoved LISTENER ============= // ======= add history links to the div_history ==== GEvent.addListener(map, "moveend", function() {I built a small page without all the stuff and tried again and it seems to work.
Dave
Posts: 1894
yep that seems to fix it for me too on the SVN version ... I'll update the SVN with this fix

-------------------------
The Termite
Posts: 26100
Great!
one other thing I noticed;
how do we change the CSS of the text of the custom map type(s) Satellite/map/hybrid?
Posts: 1894
in MapHedaer.tpl
MyMapTypeControls.prototype.CreateTextEl_ = function(button,text) {ldelim} var textel = document.createElement("div"); textel.style.position = "absolute"; textel.style.textAlign = "center"; if (!IEVersion) textel.style.top ="3px"; textel.style.left = "0px"; textel.style.zIndex = 101; textel.style.width = "80px"; textel.innerHTML = text; button.appendChild(textel); {rdelim} MyMapTypeControls.prototype.setButtonStyle_ = function(button,imgfile,id) {ldelim} var image = document.createElement("img"); if (!IEVersion ||(IEVersion && IEVersion >= 7)) image.src = imgfile; else {ldelim} image.src = "{$map.gallerybase}modules/map/images/blank.gif"; image.style.filter = "filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+imgfile+"')"; {rdelim} image.id = id; button.appendChild(image); button.style.cursor = "pointer"; button.style.position = "absolute"; button.style.color = "white"; button.style.font = "small Arial"; button.style.padding = "2px"; button.style.marginBottom = "3px"; button.style.textAlign = "center"; {rdelim}This is what takes care of the CSS for these item. CreateTextEl_ write the actual text whereas setButtonStyle_ change the CSS for the buttons
What did you notice ?
-------------------------
The Termite
Posts: 26100
Before we had a css for the custom control.
I would like to change the font-size and type. I can add that to the .tpl. But I would like to see a class added to the <div>?
I see the div is made with: document.createElement("div");
Is there a way to give the div its own class?
Posts: 1894
Yes. button.class = "xyz";