Set centre of map
Can anyone help me with this, I would like to be able to set where the centre point of my map is when it loads in regardless of where the actual locations are.
Thanks.
Can anyone help me with this, I would like to be able to set where the centre point of my map is when it loads in regardless of where the actual locations are.
Thanks.
There is a google map API call .setCenter to change the center point. You could add that to the code or add your own code to set the center after the map has loaded:
reference.html#GMap2.setCenter
Does this code need to be in a specfic place to stop the WA code centering on one of the locations?
It can be called anytime after the WA code has run, or you could replace or remove the existing line in the WA code.
It shouldn't matter unless the WA code runs after and resets the center.
Ive tried adding to the WA code but I just get a grey map or no map at all.
The only code that I can find to replace is in relation to a marker or if the marker fails.
So which bit do I replace?
and do I replace with;
goole.maps.setCenter(center:Lat, Long, zoom:Number)
or have I read it wrong?
I could look at a page that isn't working and tell you what is wrong. Without looking at a result it is difficult to say... could be a typo... could be replacing the wrong line... could be a syntax error.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.