- This topic has 51 replies, 8 voices, and was last updated 12 years, 1 month ago by support-octavio.
-
AuthorPosts
-
BrandonMemberThe first one that jumps out at me is this:
var latlng = new google.maps.LatLng(56.481975, -2.956910; should be var latlng = new google.maps.LatLng(56.481975, -2.956910);
Let me know if that works.
robert65MemberThanks again for the quick response but no difference,I just don’t know what is different from last night when it worked fine
BrandonMemberAlso Here:
//Create a new marker with a title// var marker = new google.maps.Marker({ position: latlng, map: map title:"Caird!" }); //Create a new marker with a title// var marker = new google.maps.Marker({ position: latlng, map: map, title:"Caird!" });
I will look at it again later when I have a little more time if this doesnt work.
robert65MemberStill no difference,thanks for now
BrandonMemberI tested this code and it works:
function DisplayMap(){ //The lat and long you want to show on the map// var latlng = new google.maps.LatLng(56.481975, -2.956910); //Map Options// var myOptions = { //Zoom - how close to the destination// zoom: 15, //Your center point// center: latlng, //Show default controls or not, best not to on phones as ot takes up a lot of room// disableDefaultUI: true, //Street view controls// streetViewControl: false, //Map Type// mapTypeId: google.maps.MapTypeId.ROADMAP }; //COPYRIGHT WHITE SPACE FIX, needs to point the map element, the same as the onebelow// document.getElementById('m1-map-map').style.lineHeight = '1'; //Create a new map and assign it to our map panel. You will notice the screen namestarts with m1-name, you must use the m1-// var map = new google.maps.Map(document.getElementById("m1-map-map"), myOptions); //Create a point for our map marker// var point = latlng;//new GLatLng(56.481975, -2.956910); //Create a new marker with a title// var marker = new google.maps.Marker({ position: latlng, map: map, title:"Caird!" }); //Create the marker on the map// marker.setMap(map); }
The only changes I did was the same ones, also Im not sure if it was like this in yours, but when I copied this code the comment lines went two lines, using the // to comment them out only allows a single line to comment out. This could have been the problem, so if you cant copy and paste make sure you have them on a single line or another set of // before them.
robert65MemberHi Cincy, I will try again later if all else fails could you oblige by sending this in a zip file and I can look to see what may be different from what I am typing to what you have
BrandonMemberAs long as your screen is named map and your panel is named map and you are calling the DisplayMap function you should be good. Thats pretty much all that is in my test project for this. But, yes, if you need me to let me know and i will zip it up for you.
robert65MemberHi Cincy, did it all again and still nothing?
BrandonMemberSee if this helps.
robert65Membercincy, this contains the same info that i previously downloaded,its when i type in my code the problem starts, i was looking for the code inserted so i can see where i am going wrong, if that is possible, i have even tried to copy and paste into dreamweaver and still cant get it to work, it must be something that i am overlooking as it worked the first time i tried it
BrandonMemberOk, so you just need one with your code so it shows your map location. I can upload one for you later this evening.
robert65MemberThankyou, that will let me see where I am going wrong, it’s appreciated
robert65MemberCincy, i think i have managed to get it to work, cheers
BrandonMemberrobert,
try this, it has the original code (as DisplayMapOriginal) along with your map, it works in both mobione and I tested it in safari also:
robert65MemberCincy,what I have found out is that you cannot copy a map file once created, the copy file or save as reverts to the basic file without the added code which means you have to either enter all the code again or copy and paste via dreameraver or similar, I managed the map on one occasion since you sent me the code to get it to work but have been unable to replicate it for the other 10 locations. Maybe the loss of code is something the Mobione team can investigate, have you found similar issues.
-
AuthorPosts