G
Guest
I'm trying to load a Virtual Earth map on my page. The instructions say to
create a div and then place it there. Everything works fine EXCEPT I can't
get the map to center on the page.
If I use <center> the page crashes. If I use align=center in the div
statement, it's ignored (it also ignores if I put align=left or align=right).
I've also tried using quote marks (i.e., align="center", etc.) and it just
left aligns the map.
The div statement contains a style reference, but I've tried it with it
taken out also and it still doesn't work. The ID for the div statement and
the map are the same.
Here's my code:
<div id='roadmap' align=center></div>
<script>
var FirstMap = new VEMap('roadmap');
FirstMap.LoadMap(new VELatLong(Latitude, Longitude), 14,
VEMapStyle.Road, false);
FirstMap.HideDashboard();
//Create a pushpin and add it to the map
// Latitude, Longitude, PushPinHeading and PushPinNote are
variables passed in the URL. Code exists to populate these variables and
it's working fine.
var FirstPushPin = new VEPushpin('1', new VELatLong(Latitude,
Longitude), null, PushPinHeading, PushPinNote);
FirstMap.AddPushpin(FirstPushPin);
</script>
Does anyone know how to make it work? I'm using IE7.
Thanks,
Michael
create a div and then place it there. Everything works fine EXCEPT I can't
get the map to center on the page.
If I use <center> the page crashes. If I use align=center in the div
statement, it's ignored (it also ignores if I put align=left or align=right).
I've also tried using quote marks (i.e., align="center", etc.) and it just
left aligns the map.
The div statement contains a style reference, but I've tried it with it
taken out also and it still doesn't work. The ID for the div statement and
the map are the same.
Here's my code:
<div id='roadmap' align=center></div>
<script>
var FirstMap = new VEMap('roadmap');
FirstMap.LoadMap(new VELatLong(Latitude, Longitude), 14,
VEMapStyle.Road, false);
FirstMap.HideDashboard();
//Create a pushpin and add it to the map
// Latitude, Longitude, PushPinHeading and PushPinNote are
variables passed in the URL. Code exists to populate these variables and
it's working fine.
var FirstPushPin = new VEPushpin('1', new VELatLong(Latitude,
Longitude), null, PushPinHeading, PushPinNote);
FirstMap.AddPushpin(FirstPushPin);
</script>
Does anyone know how to make it work? I'm using IE7.
Thanks,
Michael