|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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'); }
|
This post has been edited 4 times, last edit by "niconutsch" (Apr 9th 2012, 4:46pm)
This post has been edited 2 times, last edit by "niconutsch" (Apr 9th 2012, 4:35pm)
okay, it seems that 'VEMap' introduces even more confustionBing, and VEMAP code are nearly identical and the look is the same .but the vemap does not need a apikey
so why you used the Bing insted of Vemapcode for the new Bingmap plugin. is there any differenz between bing and vemap
