if it doesnt work on safari then you need the google maps api forum :)
ade
Hope someone can help
cheers markus
My map is created by using the GMAPS API. if you go to www.nulaz.com you will see the map. This is the mainfeature of the website and we really need to place the map on the website (iphone-webiste). So the google maps call is created in a javascript file. But the problem still is that it doesn't show up on the iphone safari browser (just grey background width the google brand and navigation controllers but not mapdetails and pins) but on the safari browser on the desktop it does.
So - I set Safari to have an iphone user agent, and had another look.
Now I get the iphone map page - but no map...
A quick look in the error console shows your page is generating a
"can't find variable HtmlControl" error.
Which may be the source of your problems.
Basically, get the map working in desktop safari first (you can set it
to send an iphone user agent in the Develop menu - not sure if this is
available by default - or use Firefox with an iphone user agent) - and
all should be well on the iphone....
Nick
Hello thx for the reply
what do you mean by serving a different file to the iphone? I have a quite a big javascriptfile that creates output by using the google maps api and put that output into the div tag.and what do you mean by actual filename in the iphone version?
sorry but i am pretty new to iphone webdeveloping
firefox switcher is at: https://addons.mozilla.org/en-US/firefox/addon/59
string is:
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML,
like Gecko) Version/3.0 Mobile/3B48b Safari/419.3
ade
i cant see/get anything in:
http://www.nulaz.com/NulazIgniter/static/nulaz/js/HtmlControl.js
which is why you get this:
HtmlControl is not defined
http://www.nulaz.com/NulazIgniter/static/nulaz/js/map_iphone.js
Line 70
ade
I have different views. if you use safari with enabled developer tools
you can switch the user agent to iphone. but the problem is if you
switch to iphone agent it works fine on the desktop safari but the
controls are not useable on the iphone. Look at the actual version http://nulaz.com/~pablo/NulazIgniter
.
i think the probelm the missing HTMLControl is no fixed
br markus
That said, as far as I am aware - on the limited testing I have done -
using webkit transforms to handle scrolling is faster than the
javascript methods.
Nick
@JCG: if you take a look at the application you'll see that the maps
application of the iphone is unusable.
@all:
then i really dont't know why this is not working:
http://nulaz.com/~pablo/NulazIgniter
i hope you can see the js files, the code for adding the controls is
in map_iphone.js
its working properly on safari with developer->User-Agent-> Mobile
Safari iphone.
but definitly not on the iphone.
On the iphone the pins are not clickable, there is no update of the
pins after dragend event (update logic is if dragging goes over the
half of the screen). Neither double finger zooming and zoom in/out
with the controls works.
on the other site i fixed the problem with the iphone that way:
I added absolute positioned elements on the page.
map = new GMap2(document.getElementById("map"));
GEvent.addDomListener(document.getElementById('btn_zoom_in'), 'click',
function() {
map.zoomIn();
});
GEvent.addDomListener(document.getElementById('btn_map_update'),
'click', function() {
var point2 = map.fromLatLngToDivPixel(map.getCenter());
if((Math.abs(Math.abs(center_point.x) - Math.abs(point2.x)) > $
('#map').width()/3 || Math.abs(Math.abs(center_point.y) -
Math.abs(point2.y)) > $('#map').height()/3)) {
loadPublicLocations();
loadFavoriteLocations();
loadMyFriends();
loadPublicPeople();
loadRSS();
}
});
Neither this works on that version on the iphone:
GEvent.addListener(marker, "mouseover", function()
{ elabel.openOnMarker(marker, label); });
(this should show tooltips if you
So i think the biggest problem in my case is, that the evnets
(dragend, click, etc.) are not recognized by the iphone
hope i gave you all the infos to describe my problem
best regards