Jump to content
Sign in to follow this  
Barassa

Google Maps + Custom Control + Jquery + Iphone

Recommended Posts

Barassa

Boas , eu estou a tentar adicionar controlos personalizados ao google maps para uma aplicação a ser usada em iphone , utilizando a framework jquery/jquery mobile o problema é que o código funciona no browser mas no iphone não ... acho que é por causa do jquery mobile .. alguem sabe porque?

function createControls(){

/***** Para centrar o mapa ******/

var controlsHomeDiv = document.createElement('DIV');

controlsHomeDiv.title = 'Click to center map';

controlsHomeDiv.id = "map_home";

var home_Img = document.createElement('a');

home_Img.href= "#";

home_Img.onclick = function() {

alert("click");

centerMap(mapCenter);

}

var the_img = document.createElement('img');

the_img.src="../files/arrow-contract-icon.png";

the_img.style.width="50px";

the_img.style.height="50px";

home_Img.appendChild(the_img);

controlsHomeDiv.appendChild(home_Img);

map.controls[google.maps.ControlPosition.TOP_LEFT].push(controlsHomeDiv);

}

obrigado

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.