Pushpin's v3 icon offset?
-
Thursday, June 01, 2006 2:23 PM
Pushpins and custom Pushpins don’t seem to have an offset as they did previously for the icons/graphics and rely on the GPS co-cords, is their a way to provide an offset?
thanks..
All Replies
-
Friday, June 02, 2006 2:37 PM
Was:
map = new Msn.VE.MapControl(document.getElementById("map"), params);
map.AddPushpin(1, lat, long, offset_x, offset_y, null, image, layer);Now:
map = new VEMap('map');
map.AddPushpin(mapObjID, new VELatLong(latitude, longitude), img, title, html);The solution for the Pushpin offset is using..
int mapObjID = 0;
function AddCustomPushpin_Adv(latitude, longitude, img, title, html, pushPinStyleClass, titleStyleClass, HTMLStyleClass){
var pin = new VEPushpin(mapObjID,
new VELatLong(latitude, longitude),
img,
title,
html,
pushPinStyleClass,
titleStyleClass,
HTMLStyleClass
);
map.AddPushpin(pin);
mapObjID++; /** increment id **/
}/** END: METHOD **/Then by adding
<style type="text/css">
.myPushpin {
position:absolute;
left:0px;
top:-20px;
}
</style>Then calling..
AddCustomPushpin_Adv(/** Lat,Long **/ 'lat', 'long',
/** Pushpin image **/ 'http://www.bla.com/Pushpin.png',
/** Pushpin title **/ null,
/** Pushpin HTMLtext **/ null,
/** StyleClass Pushpin **/ "myPushpin",
/** StyleClass title **/ null,
/** StyleClass HTMLtext **/ null);url: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/VEMapControl/HTML/Pushpins.asp

