dear l. and g.
Im removeing all the google and bingmap flashstuff from my work.
so i started to implement VeMap.(no damned Key is necassery,and good dokumentation is available.http://msdn.microsoft.com/en-us/library/bb412424.aspx)
pleas have a look on the code. the black text is nearly original and works so far the green text is my useless try
to get it work for me.
Code
var map = null; var pin1 = null; var pin2 = null; var pin3 = null; var pin4 = null; var pin5 = null; var center = new VELatLong(47.283987,11.5046291); var portal = new VELatLong(47.283374,11.503791); var neubau = new VELatLong(47.283681,11.504429); var garten = new VELatLong(47.28443,11.505266); var internat= new VELatLong(47.284485,11.505467);
function GetMap(){ map = new VEMap('myMap'); map.LoadMap(center, 1, VEMapStyle.Birdseye, false); map.AttachEvent("onclick", todo);
var pincenter = new VEShape(VEShapeType.Pushpin,center);pincenter.SetCustomIcon("");map.AddShape(pincenter);
var pin1 = new VEShape(VEShapeType.Pushpin,portal);pin1.SetCustomIcon("");map.AddShape(pin1); var pin2 = new VEShape(VEShapeType.Pushpin,neubau);pin2.SetCustomIcon("");map.AddShape(pin2); var pin3 = new VEShape(VEShapeType.Pushpin,garten);pin3.SetCustomIcon("");map.AddShape(pin3); var pin4 = new VEShape(VEShapeType.Pushpin,internat);pin4.SetCustomIcon("");map.AddShape(pin4);
var points = new Array(portal,neubau,garten,internat);polyline = new VEShape(VEShapeType.Polyline, points); polyline.HideIcon();polyline.SetLineColor(new VEColor(0,255,0,1));polyline.SetFillColor(new VEColor(0,0,255,0));polyline.SetLineWidth(15);map.AddShape(polyline);
timeOut();
function v1(){pin1.SetCustomIcon("");}function v2(){pin2.SetCustomIcon("");}function v3(){pin3.SetCustomIcon("");}function v4(){pin4.SetCustomIcon("");}
function todo(event) { if (event.elementID != null) { var shape = map.GetShapeByID(event.elementID); var id = shape.GetID(); var id = event.elementID; //alert (event.elementID); if (event.elementID == 'msftve_1000_200001_10001') { v1();pano_01();timeOut();blur() } else if (event.elementID == 'msftve_1000_200002_10002') { v2();pano_02();timeOut();blur() } else if (event.elementID == 'msftve_1000_200003_10003') { v3();pano_03();timeOut();blur() } else if (event.elementID == 'msftve_1000_200004_10004') { v4();pano_04();timeOut();blur() }
else if (event.elementID == 'msftve_1000_200000_10000') { hideMap();blur() } } }}
window.pano_01 =function(e) {javascript:krpano().call('loadscene(scene_p01)')}window.pano_02 =function(e) {javascript:krpano().call('loadscene(scene_p02)')}window.pano_03 =function(e) {javascript:krpano().call('loadscene(scene_p04)')}window.pano_04 = function(e) {javascript:krpano().call('loadscene(scene_p03)')}
function hideMap() {$('#mapplane').hide('slow');}function timeOut(){setTimeout(hideMap, 2000);}$(document).ready(function() {$('#mapplane').show();$('#schalter').click(function () {$('#mapplane').toggle('slow');});
});
function krpano(){return document.getElementById('krpanoSWFObject'); }
Alles anzeigen
Bug:ipad keyboard is opening when mapspots are clicked??????
here is the original code from bing (VeMap) get shape
thanks for looking with me
niconutschi