{"version":3,"sources":["BingmapsHelpers.js","PushPinOptionsEnum.js","IPushPinOptions.js","PinOptionsFactory.js","Coordinates.js","Point.js","Polygons.js","Bingmaps.js","SinglePinMapWithInfobox.js","MultiPinMap.js","MultiPinMapNumberedPins.js","MapWithShape.js","FamilyTripRouteMap.js","PolygonCreator.js"],"names":["Wdot","Maps","BingMapsHelpers","getIrefIndexValuesFromPoint","ref","polygonNum","parseInt","substring","lastIndexOf","index","getTripRandomizerPinOptionsEnum","tripCategory","isHighlight","Enums","TripThemeEnum","Play","PushPinOptionsEnum","PinImageForTripCityPlayLocationsHighlighted","Stay","PinImageForTripCityStayLocationsHighlighted","Eat","PinImageForTripCityEatLocationsHighlighted","Event","PinImageForTripCityEventLocationsHighlighted","PinImageForTripCityPlayLocations","PinImageForTripCityStayLocations","PinImageForTripCityEatLocations","PinImageForTripCityEventLocations","getInfoboxHtmlString","title","address","description","websiteUrl","showCloseButton","topOffset","wrapperClasses","htmlContentString","encodeURI","decodeURI","BingMaps","PushPinOptions","PushPinOptionsPinImageWithText","prototype","getPushPinOptions","pinOptions","pinText","icon","PushPinOptionsPinImageWithOutText","PushPinOptionsPinImageForRoadTrip","PushPinOptionsPinImageWithTextListingPage","anchor","Microsoft","Point","PushPinOptionsPinImageForTripCityPlayLocations","PushPinOptionsPinImageForTripCityPlayLocationsHighlighted","PushPinOptionsPinImageForTripCityStayLocations","PushPinOptionsPinImageForTripCityStayLocationsHighlighted","PushPinOptionsPinImageForTripCityEatLocations","PushPinOptionsPinImageForTripCityEatLocationsHighlighted","PushPinOptionsPinImageForTripCityEventLocations","PushPinOptionsPinImageForTripCityEventLocationsHighlighted","Factory","PinOptionsFactory","getPinOptions","pushPinOptionsEnum","defaultPinOptions","getDefaultPinOptions","PinImageWithText","PinImageWithOutText","PinImageForRoadTrip","PinImageWithTextListingPage","baseOptions","offset","visible","textOffset","draggable","Coordinates","pointsList","ko","observableArray","i","la","lo","_this","observable","iref","latitude","longitude","getPolygonNumber","computed","owner","read","getIndex","self","Polygons","coordinates","_log","Math","log","key","hideOverlay","movePinByText","text","pushpin","map","entities","getLength","get","getText","setLocation","Location","apiKey","geoCodeBaseUrl","pinOptionsFactory","showZoomControls","$","length","data","toLowerCase","bindMethodToPreventPinterestPinningMapTiles","m","Events","addHandler","find","attr","removeClass","height","setTimeout","pinHtml","loadMap","mapId","mapElement","mapDiv","document","getElementById","center","Map","showMapTypeSelector","credentials","zoom","showZoomButtons","bind","bestMapView","mapWidth","mapHeight","buffer","console","group","zoomLevel","maxLat","minLat","maxLon","minLon","length_1","zoom1","zoom2","pin","location_1","getLocation","setView","alert","groupEnd","addPin","dropPinFunction","toString","iconOverrideUrl","Pushpin","push","parseFloat","removePinByText","indexRemoved","removeAt","pushpinText","indexOf","setOptions","geoCodeAddress","callback","state","city","zip","street","url","callRestService","request","script","createElement","setAttribute","body","appendChild","removeAllPins","clear","addEvent","eventname","eventfunction","__extends","extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__","constructor","create","SinglePinMapWithInfobox","_super","call","panningHandlerId","isCity","disableMapPanning","mapDisabled","mouseEvent","isMobile","handled","removeHandler","loadSinglePinMapWithInfobox","pinObject","Latitude","Longitude","enableClickableLogo","showDashboard","showBreadcrumb","disableScrollWheelZoom","getZoomRange","max","min","getZoom","addLocation","width","item","infoboxHtmlString","City","PlaceName","Address","infoboxOptions","htmlContent","infoBox","Infobox","setMap","ResetMapCenter","MultiPinMap","pinLocationsArray","isRoadTrip","isMiniMap","locationsArray","showScalebar","showLocateMeButton","x","utils","arrayForEach","PinText","center_1","location","MultiPinMapNumberedPins","centerPinLocation","eventLocations","directionsManager","directionsErrorEventObj","KeyHtmlPushpin","displayInfobox","showInfoBox","registerModule","fullAddress","Street","State","Zip","closeInfobox","loadModule","pinsHtml","HtmlPushpin","Name","WebsiteUrl","metaData","type","layer","HtmlPushpinLayer","layers","insert","pinWithInfoBoxLocation","addLocationWithInfoBox","displayEventsWithMultipleLocations","e","self_1","jumpAnchor","window","scrollTo","top","infoId","scrollIntoView","behavior","block","inline","showInfobox","removeHtmlPushpinLayer","isNaN","_pushpins","isHtmlPushpin","forEach","element","metadata","MapWithShape","loadMapWithShape","polygon","zoomLevelString","allRegions","ceil","polygonPoints","each","value","maxIndexOfFillShapes","allRegionsJson","parseJSON","index_1","regionIndex","regionValue","index2","value2","Polygon","fillColor","Color","strokeColor","strokeThickness","Polyline","location_2","entity","locations","_locations","j","FamilyTripRouteMap","isFirstPin","generationArray","infoboxLayer","finalDestination","allWaypoints","sessionKey","pinInfoBox","generationRoutes","Layer","disablePanning","getCredentials","c","drawRoute","RouteInfo","waypoints","JSON","parse","GenerationWaypoints","finalPinOptions","addFamilyTripPin","bestMapViewFamilyTrip","children","generationRoute","routeOptions","options","createFamilyRoute","includeText","generationImageString","infoboxClass","setInfoBox","html","FileLocation","replace","YoutubeId","pushpinFrameHTML","LocationUrl","Caption","mapViewCenter","ga","LocationName","generationImage","showPointer","infobox","getCenter","generation","PinImageLocation","waypointStringstring","GenerationImage","InfoboxClass","routeRequest","callRestServiceTest","response","resourceSets","resources","route","routePath","line","locs","len","routeColor","A","R","G","B","uniqueName","getUniqueName","round","name","random","PolygonCreator","apply","arguments","centerLat","centerLong","multipolygon","points","currentpolygon","currentMaxPinText","toggleShape","num","hasClass","addClass","cleanUpExtraPins","polygonsToDelete","i1","firstPin_1","polygonClosureIndex_1","splice","reverse","render","init","mapSelector","val","jsonString","json","object","isClosed","click","event","point1","getX","getY","originalEvent","ctrlKey","targetType","target","tryPixelToLocation","addPoint","firstPoint","i_1","l","movePin","button","navigator","userAgent","lastPointIndex","edit_pin","createPolygonJson","validateAllPolygonsClosed","Ajax","Post","id","coordsLength","stringify","clearPins","removeAll","validateAllPolygonsClosedEvent","stopImmediatePropagation"],"mappings":"aAAA,GAAIA,CAAAA,IAAI,CACR,CAAC,SAAUA,CAAI,CAAE,CACb,GAAIC,CAAAA,CAAI,CACR,CAAC,SAAUA,CAAI,CAAE,CACb,GAAI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W,yBAAyB,CAAG,UAAY,CAC1C,GAAyB,IAAI,EAAzB,IAAI,CAAC5C,YAAoB,EAAkC,CAAC,EAA/B,IAAI,CAACA,YAAY,CAAC,CAAC,CAAClS,MAAW,EAA8B,IAAI,EAA9B,IAAI,CAACkS,YAAY,CAAC,CAAC,CAAC,CAAC,CAAS,EAAkD,CAAC,EAA/C,IAAI,CAACA,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAACzU,UAAU,CAAC,CAAC,CAACuC,MAAW,CACjJ,SAEJ,IAAK,GAAIpC,CAAAA,CAAC,CAAG,CAAC,CAAEA,CAAC,CAAG,IAAI,CAACsU,YAAY,CAAC,CAAC,CAAClS,MAAM,CAAEpC,CAAC,EAAE,CAC/C,GAAI,CAAC,IAAI,CAAC4V,QAAQ,CAAC5V,CAAC,CAAC,CACjB,SAGR,QACJ,CAAC,CACMG,CACX,CACA,MAtRA+G,CAAAA,SAAS,CAAC+M,CAAc,CAAEjM,CAAM,CAAC,CAsR1BiM,CACX,CAAC,CAAChZ,CAAI,CAACsC,QAAQ,CAAE,CACjBtC,CAAI,CAACgZ,cAAc,CAAGA,CAC1B,CAAC,EAAEhZ,CAAI,CAAGD,CAAI,CAACC,IAAI,GAAKD,CAAI,CAACC,IAAI,CAAG,CAAC,CAAC,CAAC,CAC3C,CAAC,EAAED,IAAI,GAAKA,IAAI,CAAG,CAAC,CAAC,CAAC,CAAC","file":"../bundle-bingmaps.js","sourcesContent":["var Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var BingMapsHelpers = (function () {\r\n function BingMapsHelpers() {\r\n }\r\n BingMapsHelpers.getIrefIndexValuesFromPoint = function (ref) {\r\n var polygonNum = parseInt(ref.substring(ref.lastIndexOf('_') + 1)), index = parseInt(ref.substring(0, ref.lastIndexOf('_')));\r\n return { polygonNum: polygonNum, index: index };\r\n };\r\n BingMapsHelpers.getTripRandomizerPinOptionsEnum = function (tripCategory, isHighlight) {\r\n if (isHighlight) {\r\n switch (tripCategory) {\r\n case Wdot.Enums.TripThemeEnum.Play:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityPlayLocationsHighlighted;\r\n case Wdot.Enums.TripThemeEnum.Stay:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityStayLocationsHighlighted;\r\n case Wdot.Enums.TripThemeEnum.Eat:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEatLocationsHighlighted;\r\n case Wdot.Enums.TripThemeEnum.Event:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEventLocationsHighlighted;\r\n }\r\n }\r\n else {\r\n switch (tripCategory) {\r\n case Wdot.Enums.TripThemeEnum.Play:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityPlayLocations;\r\n case Wdot.Enums.TripThemeEnum.Stay:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityStayLocations;\r\n case Wdot.Enums.TripThemeEnum.Eat:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEatLocations;\r\n case Wdot.Enums.TripThemeEnum.Event:\r\n return Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEventLocations;\r\n }\r\n }\r\n };\r\n BingMapsHelpers.getInfoboxHtmlString = function (title, address, description, websiteUrl, showCloseButton, topOffset, wrapperClasses = \"\") {\r\n //console.log('getInfoboxHtmlString');\r\n var htmlContentString = \"
\\n
\";\r\n if (showCloseButton) {\r\n htmlContentString += \"x\";\r\n }\r\n htmlContentString += \"
\\n
\" + title + \"
\\n
\";\r\n if (description) {\r\n htmlContentString += \"

\" + description + \"

\";\r\n }\r\n if (address) {\r\n htmlContentString += \"Get Directions
\";\r\n }\r\n if (websiteUrl) {\r\n htmlContentString += \"Website \";\r\n }\r\n htmlContentString += \"
\";\r\n return htmlContentString;\r\n };\r\n return BingMapsHelpers;\r\n }());\r\n Maps.BingMapsHelpers = BingMapsHelpers;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\n(function (Wdot) {\r\n var Enums;\r\n (function (Enums) {\r\n var PushPinOptionsEnum;\r\n (function (PushPinOptionsEnum) {\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageWithText\"] = 0] = \"PinImageWithText\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageWithOutText\"] = 1] = \"PinImageWithOutText\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForRoadTrip\"] = 2] = \"PinImageForRoadTrip\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageWithTextListingPage\"] = 3] = \"PinImageWithTextListingPage\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityPlayLocations\"] = 4] = \"PinImageForTripCityPlayLocations\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityPlayLocationsHighlighted\"] = 5] = \"PinImageForTripCityPlayLocationsHighlighted\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityStayLocations\"] = 6] = \"PinImageForTripCityStayLocations\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityStayLocationsHighlighted\"] = 7] = \"PinImageForTripCityStayLocationsHighlighted\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityEatLocations\"] = 8] = \"PinImageForTripCityEatLocations\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityEatLocationsHighlighted\"] = 9] = \"PinImageForTripCityEatLocationsHighlighted\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityEventLocations\"] = 10] = \"PinImageForTripCityEventLocations\";\r\n PushPinOptionsEnum[PushPinOptionsEnum[\"PinImageForTripCityEventLocationsHighlighted\"] = 11] = \"PinImageForTripCityEventLocationsHighlighted\";\r\n })(PushPinOptionsEnum = Enums.PushPinOptionsEnum || (Enums.PushPinOptionsEnum = {}));\r\n })(Enums = Wdot.Enums || (Wdot.Enums = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\n(function (Wdot) {\r\n var BingMaps;\r\n (function (BingMaps) {\r\n var PushPinOptions;\r\n (function (PushPinOptions) {\r\n var PushPinOptionsPinImageWithText = (function () {\r\n function PushPinOptionsPinImageWithText() {\r\n }\r\n PushPinOptionsPinImageWithText.prototype.getPushPinOptions = function (pinOptions, pinText) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/pushpin_3.png?watermark=pintext&text=' + pinText;\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageWithText;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageWithText = PushPinOptionsPinImageWithText;\r\n var PushPinOptionsPinImageWithOutText = (function () {\r\n function PushPinOptionsPinImageWithOutText() {\r\n }\r\n PushPinOptionsPinImageWithOutText.prototype.getPushPinOptions = function (pinOptions, pinText) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/pushpin_2.png';\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageWithOutText;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageWithOutText = PushPinOptionsPinImageWithOutText;\r\n var PushPinOptionsPinImageForRoadTrip = (function () {\r\n function PushPinOptionsPinImageForRoadTrip() {\r\n }\r\n PushPinOptionsPinImageForRoadTrip.prototype.getPushPinOptions = function (pinOptions, pinText) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/pushpin_roadtrip.png';\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForRoadTrip;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForRoadTrip = PushPinOptionsPinImageForRoadTrip;\r\n var PushPinOptionsPinImageWithTextListingPage = (function () {\r\n function PushPinOptionsPinImageWithTextListingPage() {\r\n }\r\n PushPinOptionsPinImageWithTextListingPage.prototype.getPushPinOptions = function (pinOptions, pinText) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/location-pin.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(12, 16);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageWithTextListingPage;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageWithTextListingPage = PushPinOptionsPinImageWithTextListingPage;\r\n //Trip Randomizer Pin Options - Possible do something a bit different?\r\n var PushPinOptionsPinImageForTripCityPlayLocations = (function () {\r\n function PushPinOptionsPinImageForTripCityPlayLocations() {\r\n }\r\n PushPinOptionsPinImageForTripCityPlayLocations.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/play.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityPlayLocations;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityPlayLocations = PushPinOptionsPinImageForTripCityPlayLocations;\r\n var PushPinOptionsPinImageForTripCityPlayLocationsHighlighted = (function () {\r\n function PushPinOptionsPinImageForTripCityPlayLocationsHighlighted() {\r\n }\r\n PushPinOptionsPinImageForTripCityPlayLocationsHighlighted.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/play-active.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityPlayLocationsHighlighted;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityPlayLocationsHighlighted = PushPinOptionsPinImageForTripCityPlayLocationsHighlighted;\r\n var PushPinOptionsPinImageForTripCityStayLocations = (function () {\r\n function PushPinOptionsPinImageForTripCityStayLocations() {\r\n }\r\n PushPinOptionsPinImageForTripCityStayLocations.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/stay.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityStayLocations;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityStayLocations = PushPinOptionsPinImageForTripCityStayLocations;\r\n var PushPinOptionsPinImageForTripCityStayLocationsHighlighted = (function () {\r\n function PushPinOptionsPinImageForTripCityStayLocationsHighlighted() {\r\n }\r\n PushPinOptionsPinImageForTripCityStayLocationsHighlighted.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/stay-active.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityStayLocationsHighlighted;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityStayLocationsHighlighted = PushPinOptionsPinImageForTripCityStayLocationsHighlighted;\r\n var PushPinOptionsPinImageForTripCityEatLocations = (function () {\r\n function PushPinOptionsPinImageForTripCityEatLocations() {\r\n }\r\n PushPinOptionsPinImageForTripCityEatLocations.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/eat.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityEatLocations;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityEatLocations = PushPinOptionsPinImageForTripCityEatLocations;\r\n var PushPinOptionsPinImageForTripCityEatLocationsHighlighted = (function () {\r\n function PushPinOptionsPinImageForTripCityEatLocationsHighlighted() {\r\n }\r\n PushPinOptionsPinImageForTripCityEatLocationsHighlighted.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/eat-active.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityEatLocationsHighlighted;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityEatLocationsHighlighted = PushPinOptionsPinImageForTripCityEatLocationsHighlighted;\r\n var PushPinOptionsPinImageForTripCityEventLocations = (function () {\r\n function PushPinOptionsPinImageForTripCityEventLocations() {\r\n }\r\n PushPinOptionsPinImageForTripCityEventLocations.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/event.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityEventLocations;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityEventLocations = PushPinOptionsPinImageForTripCityEventLocations;\r\n var PushPinOptionsPinImageForTripCityEventLocationsHighlighted = (function () {\r\n function PushPinOptionsPinImageForTripCityEventLocationsHighlighted() {\r\n }\r\n PushPinOptionsPinImageForTripCityEventLocationsHighlighted.prototype.getPushPinOptions = function (pinOptions) {\r\n if (pinOptions == null || pinOptions == undefined) {\r\n pinOptions = {};\r\n }\r\n pinOptions.icon = '/images/public/map_images/trip_randomizer/event-active.svg';\r\n pinOptions.anchor = new Microsoft.Maps.Point(27.25, 85.6);\r\n return pinOptions;\r\n };\r\n return PushPinOptionsPinImageForTripCityEventLocationsHighlighted;\r\n }());\r\n PushPinOptions.PushPinOptionsPinImageForTripCityEventLocationsHighlighted = PushPinOptionsPinImageForTripCityEventLocationsHighlighted;\r\n })(PushPinOptions = BingMaps.PushPinOptions || (BingMaps.PushPinOptions = {}));\r\n })(BingMaps = Wdot.BingMaps || (Wdot.BingMaps = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\n(function (Wdot) {\r\n var BingMaps;\r\n (function (BingMaps) {\r\n var Factory;\r\n (function (Factory) {\r\n var PinOptionsFactory = (function () {\r\n function PinOptionsFactory() {\r\n }\r\n PinOptionsFactory.prototype.getPinOptions = function (pushPinOptionsEnum) {\r\n var defaultPinOptions = this.getDefaultPinOptions();\r\n var pinOptions;\r\n switch (pushPinOptionsEnum) {\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageWithText:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageWithText();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageWithOutText:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageWithOutText();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForRoadTrip:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForRoadTrip();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageWithTextListingPage:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageWithTextListingPage();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityPlayLocations:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityPlayLocations();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityPlayLocationsHighlighted:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityPlayLocationsHighlighted();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityStayLocations:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityStayLocations();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityStayLocationsHighlighted:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityStayLocationsHighlighted();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEatLocations:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityEatLocations();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEatLocationsHighlighted:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityEatLocationsHighlighted();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEventLocations:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityEventLocations();\r\n break;\r\n case Wdot.Enums.PushPinOptionsEnum.PinImageForTripCityEventLocationsHighlighted:\r\n pinOptions = new Wdot.BingMaps.PushPinOptions.PushPinOptionsPinImageForTripCityEventLocationsHighlighted();\r\n break;\r\n }\r\n return pinOptions.getPushPinOptions(defaultPinOptions);\r\n };\r\n PinOptionsFactory.prototype.getDefaultPinOptions = function () {\r\n var baseOptions;\r\n var offset = new Microsoft.Maps.Point(0, 5);\r\n baseOptions = {\r\n visible: true,\r\n textOffset: offset,\r\n draggable: false\r\n };\r\n return baseOptions;\r\n };\r\n return PinOptionsFactory;\r\n }());\r\n Factory.PinOptionsFactory = PinOptionsFactory;\r\n })(Factory = BingMaps.Factory || (BingMaps.Factory = {}));\r\n })(BingMaps = Wdot.BingMaps || (Wdot.BingMaps = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var Coordinates = (function () {\r\n function Coordinates(pointsList) {\r\n if (!pointsList) {\r\n this.pointsList = ko.observableArray();\r\n }\r\n else {\r\n this.pointsList = pointsList;\r\n }\r\n }\r\n return Coordinates;\r\n }());\r\n Maps.Coordinates = Coordinates;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var Point = (function () {\r\n function Point(i, la, lo) {\r\n var _this = this;\r\n this.pinText = ko.observable('');\r\n this.iref = ko.observable(i);\r\n this.latitude = ko.observable(la);\r\n this.longitude = ko.observable(lo);\r\n this.getPolygonNumber = ko.computed({\r\n owner: this,\r\n read: function () {\r\n //self = this;\r\n return Maps.BingMapsHelpers.getIrefIndexValuesFromPoint(_this.iref()).polygonNum;\r\n }\r\n });\r\n }\r\n Point.prototype.getIndex = function () {\r\n var self = this;\r\n return Maps.BingMapsHelpers.getIrefIndexValuesFromPoint(self.iref()).index;\r\n };\r\n return Point;\r\n }());\r\n Maps.Point = Point;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var Polygons = (function () {\r\n function Polygons(coordinates) {\r\n this.coordinates = coordinates;\r\n }\r\n return Polygons;\r\n }());\r\n Maps.Polygons = Polygons;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var Wdot;\r\nvar _log = false;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var BingMaps = (function () {\r\n function BingMaps(key) {\r\n this.hideOverlay = false;\r\n this.movePinByText = function (text, latitude, longitude) {\r\n for (var i = this.map.entities.getLength() - 1; i >= 0; i--) {\r\n var pushpin = this.map.entities.get(i);\r\n if (pushpin.getText() == text) {\r\n pushpin.setLocation(new Microsoft.Maps.Location(latitude, longitude));\r\n }\r\n }\r\n };\r\n this.apiKey = key;\r\n this.geoCodeBaseUrl = \"//dev.virtualearth.net/REST/v1/Locations?output=json&maxResults=1&key=\" + key;\r\n this.pinOptionsFactory = new Wdot.BingMaps.Factory.PinOptionsFactory();\r\n if ($(\"[data-isdesktop]\").length > 0) {\r\n this.showZoomControls = ($(\"[data-isdesktop]\").data(\"isdesktop\").toLowerCase() == \"true\");\r\n }\r\n else {\r\n this.showZoomControls = true;\r\n }\r\n }\r\n BingMaps.prototype.bindMethodToPreventPinterestPinningMapTiles = function (m) {\r\n Microsoft.Maps.Events.addHandler(m, 'tiledownloadcomplete', function () {\r\n $(\".MicrosoftMap\").find(\"img\").attr(\"nopin\", \"nopin\");\r\n if (this.hideOverlay) {\r\n $(\".OverlaysTL.hidden\").removeClass(\"hidden\");\r\n $(\".OverlaysTL\").height(0);\r\n }\r\n });\r\n setTimeout(function () {\r\n $(\".MicrosoftMap\").find(\"img\").attr(\"nopin\", \"nopin\");\r\n }, 750);\r\n };\r\n BingMaps.prototype.pinHtml = function (pinText) {\r\n if (pinText == undefined)\r\n pinText = \"\";\r\n return \"
\" + pinText + \"
\";\r\n };\r\n BingMaps.prototype.loadMap = function (mapId, latitude, longitude, mapElement) {\r\n var mapDiv;\r\n if (mapElement) {\r\n mapDiv = mapElement;\r\n }\r\n else {\r\n mapDiv = document.getElementById(mapId);\r\n }\r\n if (latitude == undefined || latitude == null || longitude == undefined || longitude == null || longitude == 0 || latitude == 0) {\r\n latitude = 44.832017349893526;\r\n longitude = -89.84687250000002;\r\n }\r\n var center = new Microsoft.Maps.Location(latitude, longitude);\r\n this.map = new Microsoft.Maps.Map(mapDiv, {\r\n showMapTypeSelector: false,\r\n credentials: this.apiKey,\r\n zoom: 11,\r\n center: center,\r\n showZoomButtons: this.showZoomControls\r\n });\r\n // Remove context menu upon right-click\r\n $('#' + mapId).bind('contextmenu', function (event) {\r\n return false;\r\n });\r\n };\r\n BingMaps.prototype.bestMapView = function (mapWidth, mapHeight, buffer) {\r\n if(_log) console.group('wdot/bingmaps/bingmaps.js bestMapView');\r\n if(_log) console.log('mapWidth:', mapWidth);\r\n if(_log) console.log('mapHeight:', mapHeight);\r\n if(_log) console.log('buffer:', buffer);\r\n if (this.map) {\r\n var center = new Microsoft.Maps.Location(44.832017349893526, -89.84687250000002), zoomLevel = 0, maxLat = -85, minLat = 85, maxLon = -180, minLon = 180, length_1 = this.map.entities.getLength(), zoom1 = 15, zoom2 = 15;\r\n for (var i = 0; i < length_1; i++) {\r\n var pin = this.map.entities.get(i);\r\n var location_1 = pin.getLocation();\r\n if (location_1.latitude > maxLat) {\r\n maxLat = location_1.latitude;\r\n }\r\n if (location_1.latitude < minLat) {\r\n minLat = location_1.latitude;\r\n }\r\n if (location_1.longitude > maxLon) {\r\n maxLon = location_1.longitude;\r\n }\r\n if (location_1.longitude < minLon) {\r\n minLon = location_1.longitude;\r\n }\r\n }\r\n if (length_1 > 0) {\r\n center.latitude = (maxLat + minLat) / 2;\r\n center.longitude = (maxLon + minLon) / 2;\r\n if (maxLon != minLon && maxLat != minLat) {\r\n zoom1 = Math.log(360.0 / 256.0 * (mapWidth - 2 * buffer) / (maxLon - minLon)) / Math.log(2);\r\n zoom2 = Math.log(180.0 / 256.0 * (mapHeight - 2 * buffer) / (maxLat - minLat)) / Math.log(2);\r\n }\r\n }\r\n else {\r\n zoom1 = 7;\r\n zoom2 = 7;\r\n }\r\n zoomLevel = (zoom1 < zoom2) ? zoom1 : zoom2;\r\n this.map.setView({ center: center, zoom: zoomLevel });\r\n if(_log) alert('wdot/bingmaps/bingmaps.js bestMapView zoomLevel:' + zoomLevel);\r\n\r\n if(_log) console.log('zoomLevel:', zoomLevel);\r\n if(_log) console.groupEnd();\r\n }\r\n };\r\n BingMaps.prototype.addPin = function (latitude, longitude, text, dropPinFunction) {\r\n if (this.map) {\r\n if (text == undefined || text == null) {\r\n text = (this.map.entities.getLength() + 1).toString();\r\n }\r\n var offset = new Microsoft.Maps.Point(0, 5), pinOptions = {\r\n text: text.toString(),\r\n visible: true,\r\n textOffset: offset,\r\n draggable: true\r\n };\r\n if (this.iconOverrideUrl) {\r\n pinOptions.icon = this.iconOverrideUrl;\r\n }\r\n var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(latitude, longitude), pinOptions);\r\n Microsoft.Maps.Events.addHandler(pin, 'dragend', dropPinFunction);\r\n this.map.entities.push(pin);\r\n this.map.setView({\r\n center: new Microsoft.Maps.Location(parseFloat(latitude), parseFloat(longitude)),\r\n zoom: 10\r\n });\r\n }\r\n };\r\n BingMaps.prototype.removePinByText = function (text) {\r\n var indexRemoved = 0;\r\n if (this.map) {\r\n for (var i = this.map.entities.getLength() - 1; i >= 0; i--) {\r\n var pushpin = this.map.entities.get(i);\r\n if (pushpin.getText() == text) {\r\n this.map.entities.removeAt(i);\r\n indexRemoved = i;\r\n }\r\n }\r\n for (var i = indexRemoved; this.map.entities.getLength() > i; i++) {\r\n var pushpin = this.map.entities.get(i);\r\n var pushpinText = (this.map.entities.indexOf(pushpin) + 1).toString();\r\n pushpin.setOptions({ text: pushpinText });\r\n }\r\n }\r\n return indexRemoved;\r\n };\r\n BingMaps.prototype.geoCodeAddress = function (address, callback) {\r\n if (address.state != undefined && address.city != undefined && address.zip != undefined && address.street != undefined) {\r\n var url = this.geoCodeBaseUrl + \"&jsonp=\" + callback + \"&adminDistrict=\" + address.state + \"&locality=\" + address.city + \"&postalCode=\" + address.zip + \"&addressLine=\" + address.street;\r\n this.callRestService(url);\r\n }\r\n };\r\n BingMaps.prototype.callRestService = function (request) {\r\n var script = document.createElement(\"script\");\r\n script.setAttribute(\"type\", \"text/javascript\");\r\n script.setAttribute(\"src\", request);\r\n script.setAttribute(\"id\", \"geoCodeRestScript\");\r\n document.body.appendChild(script);\r\n //$(\"#geoCodeRestScript\").remove();\r\n };\r\n BingMaps.prototype.removeAllPins = function () {\r\n this.map.entities.clear();\r\n };\r\n BingMaps.prototype.addEvent = function (eventname, eventfunction) {\r\n Microsoft.Maps.Events.addHandler(this.map, eventname, eventfunction);\r\n };\r\n return BingMaps;\r\n }());\r\n Maps.BingMaps = BingMaps;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n //console.log('wdot/bingmaps/SinglePinMapWithInfobox.js wdot.maps loaded'); \r\n var SinglePinMapWithInfobox = (function (_super) {\r\n __extends(SinglePinMapWithInfobox, _super);\r\n function SinglePinMapWithInfobox(key) {\r\n //console.log('wdot/bingmaps/SinglePinMapWithInfobox.js SinglePinMapWithInfobox()'); \r\n var _this = _super.call(this, key) || this;\r\n _this.map = null;\r\n _this.websiteUrl = \"\";\r\n _this.panningHandlerId = 0;\r\n _this.mapElement = null;\r\n _this.latitude = null;\r\n _this.longitude = null;\r\n _this.isCity = null;\r\n _this.disableMapPanning = function (mapDisabled) {\r\n if (mapDisabled) {\r\n this.panningHandlerId = Microsoft.Maps.Events.addHandler(this.map, 'mousedown', function (mouseEvent) {\r\n if (this.isMobile) {\r\n mouseEvent.handled = true;\r\n }\r\n });\r\n }\r\n else {\r\n if (this.panningHandlerId) {\r\n this.panningHandlerId = Microsoft.Maps.Events.removeHandler(this.panningHandlerId);\r\n }\r\n }\r\n };\r\n return _this;\r\n }\r\n SinglePinMapWithInfobox.prototype.loadSinglePinMapWithInfobox = function (pinObject, zoomLevel, mapElement, websiteUrl, isCity) {\r\n //console.log('wdot/bingmaps/SinglePinMapWithInfobox.js loadSinglePinMapWithInfobox()');\r\n if (isCity) {\r\n this.isCity = isCity;\r\n }\r\n if (mapElement) {\r\n this.mapElement = mapElement;\r\n }\r\n if (websiteUrl) {\r\n this.websiteUrl = websiteUrl;\r\n }\r\n if (pinObject) {\r\n this.latitude = pinObject[0].Latitude;\r\n this.longitude = pinObject[0].Longitude;\r\n }\r\n var center = new Microsoft.Maps.Location(this.latitude, this.longitude);\r\n this.map = new Microsoft.Maps.Map(this.mapElement, {\r\n enableClickableLogo: false,\r\n showMapTypeSelector: false,\r\n showDashboard: true,\r\n showBreadcrumb: false,\r\n credentials: this.apiKey,\r\n zoom: zoomLevel,\r\n center: center,\r\n disableScrollWheelZoom: true,\r\n showZoomButtons: this.showZoomControls\r\n });\r\n this.map.getZoomRange = function () {\r\n return { max: 15, min: 5 };\r\n };\r\n var self = this;\r\n Microsoft.Maps.Events.addHandler(self.map, 'viewchangeend', function () {\r\n if (self.map.getZoom() <= self.map.getZoomRange().min) {\r\n self.map.setView({ 'zoom': self.map.getZoomRange().min });\r\n }\r\n else if (self.map.getZoom() >= self.map.getZoomRange().max) {\r\n self.map.setView({ 'zoom': self.map.getZoomRange().max });\r\n }\r\n });\r\n Microsoft.Maps.Events.addHandler(this.map, 'mousewheel', function (e) {\r\n return true;\r\n });\r\n this.addLocation(pinObject[0]);\r\n if (zoomLevel != undefined && zoomLevel != null) {\r\n this.map.setView({\r\n center: center,\r\n zoom: zoomLevel\r\n });\r\n }\r\n else {\r\n this.bestMapView($(\"#singlePin .MicrosoftMap\").width(), $(\"#singlePin .MicrosoftMap\").height(), 75);\r\n }\r\n };\r\n SinglePinMapWithInfobox.prototype.addLocation = function (item) {\r\n //console.log('wdot/bingmaps/SinglePinMapWithInfobox.js addLocation()');\r\n var offset = new Microsoft.Maps.Point(0, 5);\r\n var pinOptions = {\r\n visible: true,\r\n textOffset: offset,\r\n draggable: false,\r\n anchor: new Microsoft.Maps.Point(14, 14)\r\n };\r\n var infoboxHtmlString = null;\r\n if (this.isCity) {\r\n infoboxHtmlString = Maps.BingMapsHelpers.getInfoboxHtmlString(item.City, item.City, null, null, false, 0);\r\n }\r\n else {\r\n infoboxHtmlString = Maps.BingMapsHelpers.getInfoboxHtmlString(item.PlaceName, item.Address, item.Address, this.websiteUrl, false, 0);\r\n }\r\n var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(item.Latitude, item.Longitude), pinOptions);\r\n this.map.entities.push(pin);\r\n var infoboxOptions = {\r\n showCloseButton: false,\r\n htmlContent: infoboxHtmlString,\r\n visible: true,\r\n };\r\n var infoBox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(this.latitude, this.longitude), infoboxOptions);\r\n infoBox.setMap(this.map);\r\n return pin;\r\n };\r\n SinglePinMapWithInfobox.prototype.ResetMapCenter = function () {\r\n this.map.setView({ center: new Microsoft.Maps.Location(this.latitude, this.longitude) });\r\n };\r\n return SinglePinMapWithInfobox;\r\n }(Maps.BingMaps));\r\n Maps.SinglePinMapWithInfobox = SinglePinMapWithInfobox;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var MultiPinMap = /** @class */ (function (_super) {\r\n __extends(MultiPinMap, _super);\r\n function MultiPinMap(key) {\r\n var _this = _super.call(this, key) || this;\r\n _this.map = null;\r\n _this.pinLocationsArray = null;\r\n _this.isRoadTrip = false;\r\n _this.mapElement = null;\r\n _this.center = null;\r\n _this.isMiniMap = false;\r\n return _this;\r\n }\r\n MultiPinMap.prototype.loadMap = function (locationsArray, zoomLevel, mapElement, eventLocations, pinWithInfoBoxLocation) {\r\n this.pinLocationsArray = locationsArray;\r\n var self = this;\r\n if (mapElement !== undefined && mapElement != null) {\r\n this.mapElement = mapElement;\r\n }\r\n else {\r\n this.mapElement = document.getElementById('multiPinMap');\r\n }\r\n var latitude = 44.832017349893526, longitude = -89.84687250000002, center = new Microsoft.Maps.Location(latitude, longitude);\r\n this.center = center;\r\n this.map = new Microsoft.Maps.Map(this.mapElement, {\r\n enableClickableLogo: false,\r\n showMapTypeSelector: false,\r\n showDashboard: true,\r\n showBreadcrumb: false,\r\n credentials: this.apiKey,\r\n zoom: 5,\r\n center: center,\r\n disableScrollWheelZoom: true,\r\n showZoomButtons: this.isMiniMap ? false : this.showZoomControls,\r\n showScalebar: !this.isMiniMap,\r\n showLocateMeButton: this.isMiniMap ? false : this.showZoomControls\r\n });\r\n this.map.getZoomRange = function () {\r\n return { max: 15, min: 5 };\r\n };\r\n var x = 0;\r\n ko.utils.arrayForEach(this.pinLocationsArray, function (item) {\r\n item.PinText = x + 1;\r\n self.addLocation(item);\r\n x++;\r\n });\r\n if (zoomLevel != 'undefined' && zoomLevel != null && x == 1) {\r\n var center_1 = new Microsoft.Maps.Location(locationsArray[0].Latitude, locationsArray[0].Longitude);\r\n this.map.setView({\r\n center: center_1,\r\n zoom: zoomLevel\r\n });\r\n }\r\n else {\r\n this.bestMapView($(\"#multiPinMap .MicrosoftMap\").width(), $(\"#multiPinMap .MicrosoftMap\").height(), 75);\r\n }\r\n //this.bindMethodToPreventPinterestPinningMapTiles(self.map);\r\n };\r\n MultiPinMap.prototype.addLocation = function (item, pinOptions) {\r\n var offset = new Microsoft.Maps.Point(0, 5);\r\n if (pinOptions == null) {\r\n pinOptions = {\r\n visible: true,\r\n textOffset: offset,\r\n draggable: false\r\n };\r\n }\r\n if (this.isRoadTrip) {\r\n pinOptions = this.pinOptionsFactory.getPinOptions(Wdot.Enums.PushPinOptionsEnum.PinImageForRoadTrip);\r\n }\r\n else {\r\n pinOptions = this.pinOptionsFactory.getPinOptions(Wdot.Enums.PushPinOptionsEnum.PinImageWithTextListingPage);\r\n }\r\n var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(item.Latitude, item.Longitude), pinOptions);\r\n var location = new Microsoft.Maps.Location(item.Latitude, item.Longitude);\r\n this.map.entities.push(pin);\r\n return pin;\r\n };\r\n MultiPinMap.prototype.ResetMapCenter = function () {\r\n if (this.center) {\r\n this.map.setView({ center: this.center });\r\n }\r\n };\r\n return MultiPinMap;\r\n }(Maps.BingMaps));\r\n Maps.MultiPinMap = MultiPinMap;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar Wdot;\r\nvar _log = false;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var MultiPinMapNumberedPins = /** @class */ (function (_super) {\r\n __extends(MultiPinMapNumberedPins, _super);\r\n\r\n MultiPinMapNumberedPins.map = null;\r\n MultiPinMapNumberedPins.KeyHtmlPushpin = 'htmlpushpin';\r\n\r\n if(_log) console.log('wdot.maps.MultiPinMapNumberedPins()');\r\n\r\n function MultiPinMapNumberedPins(key) {\r\n var _this = _super.call(this, key) || this;\r\n _this.centerPinLocation = null;\r\n _this.center = null;\r\n _this.eventLocations = null;\r\n _this.directionsManager = null;\r\n _this.directionsErrorEventObj = null;\r\n return _this;\r\n }\r\n MultiPinMapNumberedPins.displayInfobox = function (pin, location, showInfoBox, map) {\r\n if(_log) console.log('MultiPinMapNumberedPins')\r\n if (pin) {\r\n //CUSTOM HTML PUSHPIN WITH DRAGGABLE\r\n //https://github.com/microsoft/BingMapsV8CodeSamples/blob/main/Samples/Overlays/Html%20Pushpin%20Layer/Html%20Pushpin%20Layer.html\r\n\r\n //Register the custom module.\r\n Microsoft.Maps.registerModule('HtmlPushpinLayerModule', '/JS/wdot/bingmaps/HtmlPushpinLayerModule_v2.js');\r\n\r\n var fullAddress = location.Address.Street + \" \" + location.Address.City + \", \" + location.Address.State + \" \" + location.Address.Zip;\r\n Wdot.Maps.MultiPinMapNumberedPins.closeInfobox();\r\n\r\n //original regular infobox\r\n // var infoboxOptions = {\r\n // htmlContent: Maps.BingMapsHelpers.getInfoboxHtmlString(location.Name, fullAddress, fullAddress, location.WebsiteUrl, true, -50),\r\n // visible: showInfoBox,\r\n // offset: new Microsoft.Maps.Point(0, -28)\r\n // };\r\n // var infoBox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(location.Latitude, location.Longitude), infoboxOptions);\r\n // Wdot.Maps.MultiPinMapNumberedPins.infoBox = infoBox;\r\n // Wdot.Maps.MultiPinMapNumberedPins.infoBox.setMap(map);\r\n\r\n //New HTML Pushpin styled after an Infobox\r\n //Load the module.\r\n Microsoft.Maps.loadModule('HtmlPushpinLayerModule', function () {\r\n\r\n //Create a simple reusable HTML template to keep things easy.\r\n var htmlTemplate = '
{text}
';\r\n \r\n var pinsHtml = [\r\n //sample code pushpin\r\n //new HtmlPushpin(new Microsoft.Maps.Location(location.Latitude + 0.001, location.Longitude + 0.01), htmlTemplate.replace('{text}', 'Draggable'), { anchor: new Microsoft.Maps.Point(50, 12), draggable: \r\n new HtmlPushpin(new Microsoft.Maps.Location(location.Latitude, location.Longitude), Maps.BingMapsHelpers.getInfoboxHtmlString(location.Name, fullAddress, fullAddress, location.WebsiteUrl, true, -50, 'c-grab pointer-events-all'), { anchor: new Microsoft.Maps.Point(20, 165), draggable: true, metaData: {type: MultiPinMapNumberedPins.KeyHtmlPushpin} })\r\n ];\r\n var layer = new HtmlPushpinLayer(pinsHtml);\r\n\r\n //Add the HTML pushpin to the map.\r\n map.layers.insert(layer);\r\n\r\n Wdot.Maps.MultiPinMapNumberedPins.layer = layer;\r\n\r\n MultiPinMapNumberedPins.map = map;\r\n //console.log('MultiPinMapNumberedPins.map:', MultiPinMapNumberedPins.map);\r\n\r\n //for testing purposes only\r\n // setTimeout(() => {\r\n // MultiPinMapNumberedPins.removeHtmlPushpinLayer();\r\n // }, 2000);\r\n\r\n });\r\n\r\n\r\n }\r\n };\r\n MultiPinMapNumberedPins.prototype.loadMap = function (locationsArray, zoomLevel, mapElement, eventLocations, pinWithInfoBoxLocation) {\r\n if(_log) console.group('wdot/bingmaps/MultiPinMapNumberedPins.js loadMap');\r\n if(_log) console.log('locationsArray:', locationsArray);\r\n if(_log) console.log('zoomLevel:', zoomLevel);\r\n if(_log) console.log('mapElement:', mapElement);\r\n if(_log) console.log('eventLocations:', eventLocations);\r\n if(_log) console.log('pinWithInfoBoxLocation:', pinWithInfoBoxLocation);\r\n\r\n this.eventLocations = eventLocations;\r\n this.pinLocationsArray = locationsArray;\r\n var self = this;\r\n if (mapElement !== undefined && mapElement != null) {\r\n this.mapElement = mapElement;\r\n }\r\n else {\r\n this.mapElement = document.getElementById('multiPinMap');\r\n }\r\n var latitude = 44.832017349893526, longitude = -89.84687250000002, center = new Microsoft.Maps.Location(latitude, longitude);\r\n this.map = new Microsoft.Maps.Map(this.mapElement, {\r\n enableClickableLogo: false,\r\n showMapTypeSelector: false,\r\n showDashboard: true,\r\n showBreadcrumb: false,\r\n credentials: this.apiKey,\r\n zoom: zoomLevel,//5,\r\n center: center,\r\n disableScrollWheelZoom: true,\r\n showZoomButtons: this.showZoomControls\r\n });\r\n this.map.getZoomRange = function () {\r\n return { max: 15, min: 5 };\r\n };\r\n if (pinWithInfoBoxLocation) {\r\n this.centerPinLocation = new Microsoft.Maps.Location(pinWithInfoBoxLocation.Latitude, pinWithInfoBoxLocation.Longitude);\r\n try {\r\n if (this.eventLocations.length <= 1) {\r\n this.addLocationWithInfoBox(pinWithInfoBoxLocation, true);\r\n }\r\n else {\r\n this.displayEventsWithMultipleLocations(this.eventLocations);\r\n }\r\n }\r\n catch (e) {\r\n this.addLocationWithInfoBox(pinWithInfoBoxLocation, true);\r\n }\r\n }\r\n var x = 0;\r\n ko.utils.arrayForEach(this.pinLocationsArray, function (item) {\r\n item.PinText = x + 1;\r\n self.addLocation(item);\r\n x++;\r\n });\r\n if(_log) console.log('map.x:', x);\r\n if (zoomLevel != 'undefined' && zoomLevel != null && x >= 1) {//was x==1\r\n var center_1 = new Microsoft.Maps.Location(locationsArray[0].Latitude, locationsArray[0].Longitude);\r\n this.map.setView({\r\n center: center_1,\r\n zoom: zoomLevel\r\n });\r\n if(_log) console.log('map.setView.zoomLevel:', zoomLevel);\r\n //if(_log) alert('wdot/bingmaps/MultiPinMapNumberedPins.js foundzoomlevel and X zoomLevel:' + zoomLevel);\r\n }\r\n else {\r\n this.bestMapView($(this.mapElement).find(\".MicrosoftMap\").width(), $(this.mapElement).find(\".MicrosoftMap\").height(), 175);\r\n if(_log) console.log('map.bestMapView()');\r\n }\r\n\r\n if(_log) console.groupEnd(); \r\n\r\n };\r\n MultiPinMapNumberedPins.prototype.addLocation = function (item) {\r\n var pinOptions = this.pinOptionsFactory.getPinOptions(Wdot.Enums.PushPinOptionsEnum.PinImageWithTextListingPage);\r\n var pin = _super.prototype.addLocation.call(this, item, pinOptions);\r\n if (pin != null) {\r\n var self_1 = this;\r\n pin.setOptions({ text: item.PinText.toString() });\r\n Microsoft.Maps.Events.addHandler(pin, 'click', function () {\r\n //console.log('MultiPinMapNumberedPins.addLocation.pin.click.item:', item);\r\n var jumpAnchor = $(self_1.mapElement).data('jump-anchor');\r\n //console.log('MultiPinMapNumberedPins.addLocation.pin.click.jumpAnchor:', jumpAnchor);\r\n if (jumpAnchor) {\r\n // It seems there is a bug in Bing Maps that occurs the first time a user clicks on a pin where, if the scroll position is changed\r\n // due to change in href or changing scroll position on window, after it scrolls to the intended position, Bing Maps will then reposition\r\n // the user at the wrong place on the page in both Edge and Chrome. I posted in the Bing Maps forum and a MS employee could not explain\r\n // the issue, but recommended this hacky workaround to add a timeout before changing scroll position.\r\n setTimeout(function () {\r\n window.scrollTo(null, $(\"#\" + jumpAnchor).offset().top);\r\n\r\n var infoId = document.getElementById(\"info\" + item.PinText.toString());\r\n if(infoId) {\r\n //console.log('found.infoId:', infoId);\r\n infoId.scrollIntoView({ behavior: \"smooth\", block: \"start\", inline: \"nearest\" });\r\n }\r\n }, 0);\r\n }\r\n else {\r\n return true;\r\n }\r\n });\r\n }\r\n return pin;\r\n };\r\n MultiPinMapNumberedPins.prototype.displayInfobox = function (pin, location, showInfoBox) {\r\n Wdot.Maps.MultiPinMapNumberedPins.displayInfobox(pin, location, showInfoBox, this.map);\r\n };\r\n MultiPinMapNumberedPins.prototype.addLocationWithInfoBox = function (location, showInfoBox) {\r\n //console.log('addLocationWithInfoBox');\r\n var baseIcon = '//ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20160525132934.57/i/BingTheme/pins/pin_55light.png';\r\n var hoverIcon = '//ecn.dev.virtualearth.net/mapcontrol/v7.0/7.0.20160525132934.57/i/BingTheme/pins/pin_55light_h.png';\r\n var offset = new Microsoft.Maps.Point(0, 5), pinOptions = {\r\n visible: true,\r\n textOffset: offset,\r\n draggable: false,\r\n anchor: new Microsoft.Maps.Point(14, 14),\r\n icon: baseIcon,\r\n };\r\n var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(location.Latitude, location.Longitude), pinOptions);\r\n this.map.entities.push(pin);\r\n if (showInfoBox) {\r\n this.displayInfobox(pin, location, showInfoBox);\r\n }\r\n var self = this;\r\n Microsoft.Maps.Events.addHandler(pin, 'click', (function () { return self.displayInfobox(pin, location, true); }));\r\n };\r\n MultiPinMapNumberedPins.prototype.displayEventsWithMultipleLocations = function (eventLocations) {\r\n var self = this;\r\n var showInfobox = true;\r\n ko.utils.arrayForEach(eventLocations, function (item) {\r\n self.addLocationWithInfoBox(item, showInfobox);\r\n if (showInfobox) {\r\n showInfobox = false;\r\n }\r\n });\r\n };\r\n MultiPinMapNumberedPins.infoBox = null;\r\n //Static methods\r\n MultiPinMapNumberedPins.closeInfobox = function () {\r\n if (this.infoBox) {\r\n this.infoBox.setOptions({ visible: false });\r\n } else {\r\n MultiPinMapNumberedPins.removeHtmlPushpinLayer();\r\n }\r\n };\r\n\r\n\r\n /**\r\n * Remove HTMLPushpinLayer from map, if found\r\n */\r\n MultiPinMapNumberedPins.removeHtmlPushpinLayer = function () {\r\n //console.log('removeHtmlPushpinLayer MultiPinMapNumberedPins.map:', MultiPinMapNumberedPins.map);\r\n\r\n if(MultiPinMapNumberedPins.map != null && MultiPinMapNumberedPins.map['layers'] != null) {\r\n //console.log('MultiPinMapNumberedPins.map[layers]:', MultiPinMapNumberedPins.map['layers']);\r\n //if map['layers'] found, loop through object and look for the layers named as Numbers, those are real layers.\r\n for (const key in MultiPinMapNumberedPins.map['layers']) {\r\n //console.log(`${key}`, map['layers'][key]);\r\n if(!isNaN(key)) {\r\n //console.log(`${key}`, MultiPinMapNumberedPins.map['layers'][key]);\r\n var _pushpins = MultiPinMapNumberedPins.map['layers'][key]['_pushpins'];\r\n //console.log('_pushpins:', _pushpins);\r\n\r\n var isHtmlPushpin = false;\r\n\r\n _pushpins.forEach(element => {\r\n //console.log('element:', element);\r\n if(element.metadata.type == MultiPinMapNumberedPins.KeyHtmlPushpin) {\r\n isHtmlPushpin = true;\r\n }\r\n });\r\n //console.log('isHtmlPushpin:', isHtmlPushpin);\r\n\r\n if(isHtmlPushpin) {\r\n //found HtmlPushpin layer\r\n MultiPinMapNumberedPins.map.layers.removeAt(key);\r\n }\r\n\r\n }\r\n }\r\n }\r\n };\r\n return MultiPinMapNumberedPins;\r\n }(Maps.MultiPinMap));\r\n Maps.MultiPinMapNumberedPins = MultiPinMapNumberedPins;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var MapWithShape = (function (_super) {\r\n __extends(MapWithShape, _super);\r\n function MapWithShape(apiKey) {\r\n var _this = _super.call(this, apiKey) || this;\r\n _this.center = null;\r\n return _this;\r\n }\r\n MapWithShape.prototype.loadMapWithShape = function (mapId, polygon, latitude, longitude, zoomLevelString, allRegions) {\r\n var self = this;\r\n this.center = new Microsoft.Maps.Location(latitude, longitude);\r\n var polygonPoints = [ko.observableArray()];\r\n var zoomLevel = parseInt(zoomLevelString);\r\n if (latitude == undefined || latitude == null || longitude == undefined || longitude == null || longitude == 0 || latitude == 0) {\r\n latitude = 44.832017349893526;\r\n longitude = -89.84687250000002;\r\n }\r\n this.map = new Microsoft.Maps.Map(document.getElementById(mapId), {\r\n enableClickableLogo: false,\r\n showMapTypeSelector: false,\r\n showDashboard: true,\r\n showBreadcrumb: false,\r\n credentials: this.apiKey,\r\n zoom: 11,\r\n center: this.center,\r\n showLocateMeButton: this.showZoomControls,\r\n showZoomButtons: this.showZoomControls\r\n });\r\n this.map.getZoomRange = function () {\r\n return { max: 15, min: 5 };\r\n };\r\n $('#' + mapId).bind('contextmenu', function (event) {\r\n return false;\r\n });\r\n this.map.entities.clear();\r\n $(polygon.Polygons[0]).each(function (index, value) {\r\n for (var i = 0; i < value.Coordinates.length; i++) {\r\n if (i > 2 && value.Coordinates[i].latitude == polygonPoints[index]()[0].latitude\r\n && value.Coordinates[i].longitude == polygonPoints[index]()[0].longitude) {\r\n polygonPoints[index]().push(polygonPoints[index]()[0]);\r\n }\r\n else {\r\n var location_1 = new Microsoft.Maps.Location(value.Coordinates[i].latitude, value.Coordinates[i].longitude);\r\n if (polygonPoints[index] == undefined) {\r\n polygonPoints[index] = ko.observableArray();\r\n }\r\n polygonPoints[index]().push(location_1);\r\n }\r\n }\r\n });\r\n var maxIndexOfFillShapes = polygonPoints.length - 1;\r\n if (allRegions != undefined) {\r\n var allRegionsJson = $.parseJSON(allRegions);\r\n var index_1 = maxIndexOfFillShapes + 1;\r\n $(allRegionsJson).each(function (regionIndex, regionValue) {\r\n //Adjustments because polygonPoints already has an item in it for the selected region\r\n $(regionValue.Polygons).each(function (i, value) {\r\n if (polygonPoints[index_1] == undefined) {\r\n polygonPoints[index_1] = ko.observableArray();\r\n }\r\n $(value.Coordinates).each(function (index2, value2) {\r\n if (index2 > 2 && value2.latitude == polygonPoints[index_1]()[0].latitude && value2.longitude == polygonPoints[index_1]()[0].longitude) {\r\n polygonPoints[index_1]().push(polygonPoints[index_1]()[0]);\r\n }\r\n else {\r\n var location = new Microsoft.Maps.Location(value2.latitude, value2.longitude);\r\n polygonPoints[index_1].push(location);\r\n }\r\n });\r\n index_1++;\r\n });\r\n });\r\n }\r\n for (var i = 0; i < polygonPoints.length; i++) {\r\n if (i <= maxIndexOfFillShapes && allRegions != undefined) {\r\n this.map.entities.push(new Microsoft.Maps.Polygon(polygonPoints[i](), {\r\n fillColor: new Microsoft.Maps.Color(100, 161, 28, 36),\r\n strokeColor: new Microsoft.Maps.Color(255, 161, 28, 36),\r\n strokeThickness: 1\r\n }));\r\n }\r\n else {\r\n if (allRegions == undefined) {\r\n this.map.entities.push(new Microsoft.Maps.Polygon(polygonPoints[i](), {\r\n fillColor: new Microsoft.Maps.Color(100, 161, 28, 36),\r\n strokeColor: new Microsoft.Maps.Color(255, 161, 28, 36),\r\n strokeThickness: 1\r\n }));\r\n }\r\n else {\r\n this.map.entities.push(new Microsoft.Maps.Polyline(polygonPoints[i](), {\r\n strokeColor: new Microsoft.Maps.Color(255, 161, 28, 36),\r\n strokeThickness: 1\r\n }));\r\n }\r\n }\r\n }\r\n if (zoomLevel == null || zoomLevel == undefined || zoomLevel == 0) {\r\n zoomLevel = 0;\r\n var maxLat = -85, minLat = 85, maxLon = -180, minLon = 180, length_1 = this.map.entities.getLength();\r\n for (var i = 0; i < length_1; i++) {\r\n var entity = this.map.entities[i], locations = entity._locations;\r\n for (var j = 0; j < locations.length; j++) {\r\n var location_2 = locations[j];\r\n if (location_2.latitude > maxLat) {\r\n maxLat = location_2.latitude;\r\n }\r\n if (location_2.latitude < minLat) {\r\n minLat = location_2.latitude;\r\n }\r\n if (location_2.longitude > maxLon) {\r\n maxLon = location_2.longitude;\r\n }\r\n if (location_2.longitude < minLon) {\r\n minLon = location_2.longitude;\r\n }\r\n }\r\n }\r\n var zoom1 = 15, zoom2 = 15;\r\n if (length_1 > 0) {\r\n if (maxLon != minLon && maxLat != minLat) {\r\n zoom1 = Math.ceil(Math.log(360.0 / 256.0 * ($(mapId).width() - 2 * 70) / (maxLon - minLon)) / Math.log(2));\r\n zoom2 = Math.ceil(Math.log(180.0 / 256.0 * ($(mapId).height() - 2 * 70) / (maxLat - minLat)) / Math.log(2));\r\n }\r\n }\r\n else {\r\n zoom1 = 7;\r\n zoom2 = 7;\r\n }\r\n zoomLevel = (zoom1 > zoom2) ? zoom1 : zoom2;\r\n }\r\n this.map.setView({ center: this.center, zoom: zoomLevel });\r\n };\r\n MapWithShape.prototype.ResetMapCenter = function () {\r\n if (this.center) {\r\n this.map.setView({ center: this.center });\r\n }\r\n };\r\n return MapWithShape;\r\n }(Maps.BingMaps));\r\n Maps.MapWithShape = MapWithShape;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var FamilyTripRouteMap = (function (_super) {\r\n __extends(FamilyTripRouteMap, _super);\r\n function FamilyTripRouteMap(key) {\r\n var _this = _super.call(this, key) || this;\r\n _this.locationsArray = new Array();\r\n _this.isFirstPin = true;\r\n _this.generationArray = new Array();\r\n _this.mapElement = null;\r\n _this.infoboxLayer = null;\r\n _this.finalDestination = null;\r\n _this.allWaypoints = new Array();\r\n _this.sessionKey = \"\";\r\n _this.center = null;\r\n return _this;\r\n }\r\n FamilyTripRouteMap.closeInfobox = function () {\r\n if (this.pinInfoBox) {\r\n this.pinInfoBox.setOptions({ visible: false });\r\n }\r\n };\r\n FamilyTripRouteMap.prototype.loadMap = function (generationRoutes, finalDestination, mapElement) {\r\n this.infoboxLayer = new Microsoft.Maps.Layer();\r\n this.generationArray = generationRoutes;\r\n var latitude = 44.832017349893526, longitude = -89.84687250000002, center = new Microsoft.Maps.Location(latitude, longitude);\r\n this.center = center;\r\n if (!mapElement) {\r\n mapElement = document.getElementById(\"familyTripMap\");\r\n }\r\n this.mapElement = mapElement;\r\n this.map = new Microsoft.Maps.Map(mapElement, {\r\n showMapTypeSelector: false,\r\n showDashboard: true,\r\n credentials: this.apiKey,\r\n zoom: 5,\r\n center: center,\r\n disablePanning: false,\r\n disableScrollWheelZoom: true,\r\n showZoomButtons: this.showZoomControls\r\n });\r\n this.map.getZoomRange = function () { return { max: 15, min: 5 }; };\r\n var self = this;\r\n this.map.getCredentials(function (c) {\r\n self.sessionKey = c;\r\n //Draw the routes\r\n for (var i = 0; i < generationRoutes.length; i++) {\r\n try {\r\n self.drawRoute(generationRoutes[i], finalDestination[0], generationRoutes[i].RouteInfo);\r\n var waypoints = JSON.parse(generationRoutes[i].GenerationWaypoints);\r\n for (var j = 0; j < waypoints.length; j++) {\r\n self.allWaypoints.push(waypoints[j]);\r\n }\r\n }\r\n catch (e) {\r\n console.log(e);\r\n }\r\n }\r\n //Show the pin for the last stop\r\n self.isFirstPin = false;\r\n var finalPinOptions = {};\r\n finalPinOptions.icon = \"/Images/public/map_images/final_flag.svg\";\r\n finalPinOptions.visible = true;\r\n finalPinOptions.draggable = false;\r\n finalPinOptions.anchor = new Microsoft.Maps.Point(25, 45);\r\n if (finalDestination[0]) {\r\n self.addFamilyTripPin(finalDestination[0], null, null, finalPinOptions);\r\n }\r\n self.bestMapViewFamilyTrip($(self.mapElement).children(\".MicrosoftMap\").width(), $(self.mapElement).children(\".MicrosoftMap\").height(), 0);\r\n });\r\n };\r\n FamilyTripRouteMap.prototype.drawRoute = function (generationRoute, finalDestination, routeOptions) {\r\n var options = JSON.parse(routeOptions);\r\n var self = this;\r\n if (generationRoute && options) {\r\n this.createFamilyRoute(generationRoute, finalDestination, options);\r\n }\r\n };\r\n FamilyTripRouteMap.prototype.addFamilyTripPin = function (location, includeText, generationImageString, pinOptions, infoboxClass) {\r\n var pin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(location.Latitude, location.Longitude), pinOptions);\r\n if (this.isFirstPin) {\r\n this.setInfoBox(pin, generationImageString);\r\n this.isFirstPin = false;\r\n return;\r\n }\r\n var self = this;\r\n Microsoft.Maps.Events.addHandler(pin, 'click', (function () { return self.displayInfobox(pin, location, infoboxClass); }));\r\n this.map.entities.push(pin);\r\n };\r\n //PUSHPIN INFOBOX CALL BACK\r\n FamilyTripRouteMap.prototype.displayInfobox = function (pin, location, infoboxClass) {\r\n if (pin) {\r\n Wdot.Maps.FamilyTripRouteMap.closeInfobox();\r\n var html = \"\";\r\n if (location.FileLocation) {\r\n html = \"\";\r\n }\r\n else {\r\n html = '';\r\n }\r\n var pushpinFrameHTML = \"
{content}
{caption}
\";\r\n var infoBox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0, 0), { visible: false });\r\n infoBox.setOptions({\r\n visible: true,\r\n offset: new Microsoft.Maps.Point(-150, 0),\r\n htmlContent: pushpinFrameHTML.replace('{content}', html).replace('{caption}', location.Caption),\r\n });\r\n //set location of infobox\r\n infoBox.setLocation(pin.getLocation());\r\n infoBox.setMap(this.map);\r\n Wdot.Maps.FamilyTripRouteMap.pinInfoBox = infoBox;\r\n var mapViewCenter = new Microsoft.Maps.Location(pin.getLocation().latitude, pin.getLocation().longitude);\r\n mapViewCenter.latitude = mapViewCenter.latitude + 1.5;\r\n this.map.setView({ center: mapViewCenter });\r\n ga('send', 'event', 'ThompsonLP', 'Map Click', location.LocationName);\r\n }\r\n };\r\n FamilyTripRouteMap.prototype.setInfoBox = function (pin, generationImageString) {\r\n var html = \"\";\r\n var generationImage = JSON.parse(generationImageString);\r\n if (generationImage) {\r\n html = \"\";\r\n }\r\n var infoboxOptions = {\r\n showPointer: false,\r\n offset: new Microsoft.Maps.Point(-100, 0),\r\n htmlContent: html\r\n };\r\n var infobox = new Microsoft.Maps.Infobox(this.map.getCenter(), infoboxOptions);\r\n infobox.setLocation(pin.getLocation());\r\n // Add the info box to the map\r\n infobox.setMap(this.map);\r\n };\r\n FamilyTripRouteMap.prototype.createFamilyRoute = function (generation, finalDestination, routeOptions) {\r\n this.isFirstPin = true;\r\n var pinOptions = {};\r\n pinOptions.icon = routeOptions.PinImageLocation;\r\n pinOptions.visible = true;\r\n pinOptions.draggable = false;\r\n pinOptions.anchor = new Microsoft.Maps.Point(25, 25);\r\n var waypointStringstring = \"\";\r\n var locations = JSON.parse(generation.GenerationWaypoints);\r\n if (finalDestination) {\r\n locations.push(finalDestination);\r\n }\r\n for (var i = 0; i < locations.length; i++) {\r\n if (i === (locations.length - 1)) {\r\n pinOptions.visible = false;\r\n }\r\n waypointStringstring += \"wp.\" + i + \"=\" + locations[i].Latitude + \",\" + locations[i].Longitude + \"&\";\r\n if (i == 0 || locations[i].FileLocation != \"\" || locations[i].YoutubeId != \"\") {\r\n this.addFamilyTripPin(locations[i], false, generation.GenerationImage, pinOptions, routeOptions.InfoboxClass);\r\n }\r\n }\r\n var routeRequest = \"https://dev.virtualearth.net/REST/v1/Routes/Driving?\" + waypointStringstring + \"ra=routePath&key=\" + this.sessionKey;\r\n var self = this;\r\n this.callRestServiceTest(routeRequest, function (response) {\r\n if (response &&\r\n response.resourceSets &&\r\n response.resourceSets.length > 0 &&\r\n response.resourceSets[0].resources) {\r\n var route = response.resourceSets[0].resources[0];\r\n var routePath = route.routePath.line.coordinates;\r\n //Generate an array of locations for the route path.\r\n var locs = [];\r\n for (var i = 0, len = routePath.length; i < len; i++) {\r\n locs.push(new Microsoft.Maps.Location(routePath[i][0], routePath[i][1]));\r\n }\r\n //Draw the route line.\r\n var routeColor = new Microsoft.Maps.Color(routeOptions.Color.A, routeOptions.Color.R, routeOptions.Color.G, routeOptions.Color.B);\r\n //var routeColor = new Microsoft.Maps.Color(255, routeOptions.Color.R, routeOptions.Color.G, routeOptions.Color.B);\r\n var line = new Microsoft.Maps.Polyline(locs, { strokeColor: routeColor, strokeThickness: 8 });\r\n self.map.entities.push(line);\r\n }\r\n });\r\n };\r\n FamilyTripRouteMap.prototype.bestMapViewFamilyTrip = function (mapWidth, mapHeight, buffer) {\r\n var center = new Microsoft.Maps.Location(44.832017349893526, -89.84687250000002), zoomLevel = 0, maxLat = -85, minLat = 85, maxLon = -180, minLon = 180, length = this.allWaypoints.length;\r\n for (var i = 0; i < length; i++) {\r\n var location_1 = this.allWaypoints[i];\r\n if (location_1.Latitude > maxLat) {\r\n maxLat = location_1.Latitude;\r\n }\r\n if (location_1.Latitude < minLat) {\r\n minLat = location_1.Latitude;\r\n }\r\n if (location_1.Longitude > maxLon) {\r\n maxLon = location_1.Longitude;\r\n }\r\n if (location_1.Longitude < minLon) {\r\n minLon = location_1.Longitude;\r\n }\r\n }\r\n var zoom1 = 15, zoom2 = 15;\r\n if (length > 0) {\r\n center.longitude = (maxLon + minLon) / 2;\r\n center.latitude = (maxLat + minLat) / 2;\r\n if (maxLon != minLon && maxLat != minLat) {\r\n zoom1 = Math.log(360.0 / 256.0 * (mapWidth - 2 * buffer) / (maxLon - minLon)) / Math.log(2);\r\n zoom2 = Math.log(180.0 / 256.0 * (mapHeight - 2 * buffer) / (maxLat - minLat)) / Math.log(2);\r\n }\r\n }\r\n else {\r\n zoom1 = 7;\r\n zoom2 = 7;\r\n }\r\n zoomLevel = (zoom1 < zoom2) ? zoom1 : zoom2;\r\n this.map.setView({ center: center, zoom: zoomLevel });\r\n };\r\n FamilyTripRouteMap.prototype.callRestServiceTest = function (request, callback) {\r\n if (callback) {\r\n //Create a unique callback function.\r\n var uniqueName = this.getUniqueName();\r\n request += '&jsonp=' + uniqueName;\r\n window[uniqueName] = function (response) {\r\n callback(response);\r\n delete (window[uniqueName]);\r\n };\r\n //Make the JSONP request.\r\n var script = document.createElement(\"script\");\r\n script.setAttribute(\"type\", \"text/javascript\");\r\n script.setAttribute(\"src\", request);\r\n document.body.appendChild(script);\r\n }\r\n };\r\n FamilyTripRouteMap.prototype.getUniqueName = function () {\r\n var name = '__callback' + Math.round(Math.random() * 100000);\r\n while (window[name]) {\r\n name = '__callback' + Math.round(Math.random() * 100000);\r\n }\r\n return name;\r\n };\r\n return FamilyTripRouteMap;\r\n }(Maps.BingMaps));\r\n FamilyTripRouteMap.pinInfoBox = null;\r\n Maps.FamilyTripRouteMap = FamilyTripRouteMap;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar Wdot;\r\n(function (Wdot) {\r\n var Maps;\r\n (function (Maps) {\r\n var PolygonCreator = (function (_super) {\r\n __extends(PolygonCreator, _super);\r\n function PolygonCreator() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.centerLat = 0;\r\n _this.centerLong = 0;\r\n _this.multipolygon = ko.observableArray();\r\n _this.points = [ko.observableArray()];\r\n _this.currentpolygon = 0;\r\n _this.currentMaxPinText = 1;\r\n _this.toggleShape = function (d) {\r\n var num = d.getPolygonNumber();\r\n if ($('[data-polygonnum=' + num + ']').hasClass('hidden')) {\r\n $('[data-polygonnum=' + num + ']').removeClass('hidden');\r\n $('[data-polygonnum-toggle=' + num + ']').removeClass('sprite-expand');\r\n $('[data-polygonnum-toggle=' + num + ']').addClass('sprite-collapse');\r\n }\r\n else {\r\n $('[data-polygonnum=' + num + ']').addClass('hidden');\r\n $('[data-polygonnum-toggle=' + num + ']').addClass('sprite-expand');\r\n $('[data-polygonnum-toggle=' + num + ']').removeClass('sprite-collapse');\r\n }\r\n };\r\n _this.cleanUpExtraPins = function () {\r\n var polygonsToDelete = [];\r\n $(this.multipolygon()).each(function (i1) {\r\n var pointsList = this;\r\n var length = pointsList.pointsList().length;\r\n if (length < 4) {\r\n polygonsToDelete.push(i1);\r\n }\r\n else {\r\n var firstPin_1 = pointsList.pointsList()[0];\r\n var polygonClosureIndex_1 = 0;\r\n $(pointsList.pointsList()).each(function (i) {\r\n if (this.latitude() == firstPin_1.latitude() && this.longitude() == firstPin_1.longitude() && i != 0 && i != length - 1) {\r\n polygonClosureIndex_1 = i;\r\n }\r\n });\r\n if (polygonClosureIndex_1 > 0) {\r\n this.points[i1](this.points[i1].splice(0, polygonClosureIndex_1 + 1));\r\n pointsList.pointsList(pointsList.pointsList.splice(0, polygonClosureIndex_1 + 1));\r\n }\r\n }\r\n });\r\n $(polygonsToDelete.reverse()).each(function (i) {\r\n this.points.splice(polygonsToDelete[i], 1);\r\n this.multipolygon().splice(polygonsToDelete[i], 1);\r\n });\r\n this.render();\r\n };\r\n _this.init = function (mapSelector, latitude, longitude) {\r\n this.centerLat = latitude;\r\n this.centerLong = longitude;\r\n $(mapSelector).bind('contextmenu', function (event) {\r\n return false;\r\n });\r\n if ($(\"#MultiPolygonJson\").val() != '') {\r\n var jsonString = $(\"#MultiPolygonJson\").val();\r\n var json = $.parseJSON(jsonString);\r\n var self_1 = this;\r\n $(json).each(function (i, object) {\r\n $(object.Polygons).each(function (index, value) {\r\n self_1.points[index] = ko.observableArray();\r\n self_1.multipolygon.push(new Maps.Coordinates());\r\n $(value.Coordinates).each(function (index2, value2) {\r\n if (index2 > 2 && value2.latitude == self_1.points[index]()[0].latitude && value2.longitude == self_1.points[index]()[0].longitude) {\r\n self_1.points[index]().push(self_1.points[index]()[0]);\r\n }\r\n else {\r\n var location = new Microsoft.Maps.Location(value2.latitude, value2.longitude);\r\n self_1.points[index].push(location);\r\n }\r\n self_1.multipolygon()[index].pointsList.push(new Maps.Point(index2 + '_' + index, value2.latitude, value2.longitude));\r\n });\r\n if (self_1.isClosed(index)) {\r\n self_1.currentpolygon++;\r\n }\r\n });\r\n });\r\n this.render();\r\n }\r\n if (this.centerLat != 0 && this.centerLong != 0) {\r\n this.map.setView({ zoom: 10, center: new Microsoft.Maps.Location(this.centerLat, this.centerLong) });\r\n }\r\n };\r\n _this.click = function (event) {\r\n var point1 = new Microsoft.Maps.Point(event.getX(), event.getY());\r\n if (!event.originalEvent.ctrlKey && event.targetType != 'pushpin') {\r\n var location_1 = event.target.tryPixelToLocation(point1);\r\n var longitude = location_1.longitude;\r\n var latitude = location_1.latitude;\r\n this.addPoint(longitude, latitude, point1);\r\n }\r\n else if (!event.originalEvent.ctrlKey && event.targetType == 'pushpin') {\r\n var i = Maps.BingMapsHelpers.getIrefIndexValuesFromPoint(event.target.iref);\r\n if (i.polygonNum == this.currentpolygon && i.index == 0 && !this.isClosed(i.polygonNum)) {\r\n this.points[i.polygonNum].push(this.points[i.polygonNum]()[0]);\r\n var firstPoint = this.multipolygon()[i.polygonNum].pointsList()[0];\r\n var iref = this.multipolygon()[i.polygonNum].pointsList().length + \"_\" + i.polygonNum;\r\n this.multipolygon()[i.polygonNum].pointsList.push(new Maps.Point(iref, firstPoint.latitude(), firstPoint.longitude()));\r\n this.currentpolygon = this.points.length;\r\n }\r\n this.render();\r\n }\r\n else if (event.originalEvent.ctrlKey && event.targetType == 'pushpin') {\r\n var i_1 = Maps.BingMapsHelpers.getIrefIndexValuesFromPoint(event.target.iref);\r\n if (i_1.polygonNum == this.currentpolygon || this.isClosed(this.currentpolygon)) {\r\n this.points[i_1.polygonNum].splice(i_1.index, 1);\r\n this.multipolygon()[i_1.polygonNum].pointsList.splice(i_1.index, 1);\r\n if (i_1.polygonNum != this.currentpolygon) {\r\n this.currentpolygon = i_1.polygonNum;\r\n }\r\n else {\r\n if (this.points[i_1.polygonNum]().length == 0) {\r\n this.points.splice(i_1.polygonNum, 1);\r\n this.multipolygon.splice(i_1.polygonNum, 1);\r\n this.currentpolygon = this.multipolygon().length;\r\n }\r\n }\r\n if (this.multipolygon()[i_1.polygonNum] != undefined) {\r\n var p = this.multipolygon()[i_1.polygonNum].pointsList();\r\n var l = p.length;\r\n if (l <= 3 && l > 1 && p[0].latitude() == p[(l - 1)].latitude() && p[0].longitude() == p[(l - 1)].longitude()) {\r\n p.splice((l - 1), 1);\r\n this.points[i_1.polygonNum].splice((l - 1), 1);\r\n }\r\n }\r\n this.render();\r\n }\r\n else {\r\n alert(\"You must close the current shape before changing an older shape!\");\r\n }\r\n }\r\n };\r\n _this.addPoint = function (longitude, latitude) {\r\n if (this.multipolygon()[this.currentpolygon] == null || this.multipolygon()[this.currentpolygon] == undefined) {\r\n this.multipolygon.push(new Maps.Coordinates());\r\n }\r\n if (this.points[this.currentpolygon] == null || this.points[this.currentpolygon] == undefined) {\r\n this.points[this.currentpolygon] = ko.observableArray();\r\n }\r\n if (!this.isClosed(this.currentpolygon)) {\r\n var index2 = this.multipolygon()[this.currentpolygon].pointsList().length;\r\n this.multipolygon()[this.currentpolygon].pointsList.push(new Maps.Point(index2 + '_' + this.currentpolygon, latitude, longitude));\r\n var location = new Microsoft.Maps.Location(latitude, longitude);\r\n this.points[this.currentpolygon].push(location);\r\n this.render();\r\n }\r\n };\r\n _this.movePin = function (event) {\r\n if (event.originalEvent.button == 2) {\r\n //var ua = $..browser;\r\n if (navigator.userAgent.indexOf(\"Firefox\") != -1) {\r\n this.click(event);\r\n }\r\n return;\r\n }\r\n var location = event.target.getLocation(), latitude = location.latitude, longitude = location.longitude, i = Maps.BingMapsHelpers.getIrefIndexValuesFromPoint(event.target.iref);\r\n this.points[i.polygonNum]()[i.index].latitude = latitude;\r\n this.points[i.polygonNum]()[i.index].longitude = longitude;\r\n this.multipolygon()[i.polygonNum].pointsList()[i.index].latitude(latitude);\r\n this.multipolygon()[i.polygonNum].pointsList()[i.index].longitude(longitude);\r\n var lastPointIndex = (this.points[i.polygonNum]().length - 1);\r\n if (i.index == 0) {\r\n this.points[i.polygonNum]()[lastPointIndex] = this.points[i.polygonNum]()[0];\r\n this.multipolygon()[i.polygonNum].pointsList()[lastPointIndex] = this.multipolygon()[i.polygonNum].pointsList()[0];\r\n }\r\n this.render();\r\n };\r\n _this.isClosed = function (polygonNum) {\r\n if (this.points[polygonNum] == null || this.points[polygonNum] == undefined) {\r\n return true;\r\n }\r\n var length = this.points[polygonNum]().length;\r\n if (length > 3 && this.points[polygonNum]()[0].latitude == this.points[polygonNum]()[length - 1].latitude && this.points[polygonNum]()[0].longitude == this.points[polygonNum]()[length - 1].longitude) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n _this.render = function () {\r\n this.map.entities.clear();\r\n this.currentMaxPinText = 1;\r\n for (var i = 0; i < this.points.length; i++) {\r\n this.map.entities.push(new Microsoft.Maps.Polyline(this.points[i]()));\r\n for (var j = 0; j < this.points[i]().length; j++) {\r\n var location_2 = this.points[i]()[j];\r\n if (j > 1 && location_2.latitude == this.points[i]()[0].latitude && location_2.longitude == this.points[i]()[0].longitude) {\r\n continue;\r\n }\r\n var offset = new Microsoft.Maps.Point(0, 5), edit_pin = new Microsoft.Maps.Pushpin(location_2, {\r\n draggable: true,\r\n text: this.currentMaxPinText.toString(),\r\n textOffset: offset,\r\n visible: true\r\n });\r\n //edit_pin.iref = j + \"_\" + i;\r\n this.map.entities.push(edit_pin);\r\n Microsoft.Maps.Events.addHandler(edit_pin, 'mouseup', this.movePin);\r\n this.multipolygon()[i].pointsList()[j].pinText(this.currentMaxPinText++);\r\n //this.multipolygon()[i].pointsList()[j].iref(edit_pin.iref);\r\n }\r\n }\r\n this.createPolygonJson();\r\n if (this.validateAllPolygonsClosed() && this.multipolygon().length > 0 && this.multipolygon()[0].pointsList().length > 0) {\r\n Wdot.Ajax.prototype.Post(\"/admin/bingmaps/envelopecenterofsqlgeography\", { id: $(\"#MultiPolygonJson\").val() }, function (data) {\r\n if (data.longitude != 0 && data.latitude != 0) {\r\n this.centerLat = data.latitude;\r\n this.centerLong = data.longitude;\r\n $(\"#Latitude\").val(this.centerLat);\r\n $(\"#Longitude\").val(this.centerLong);\r\n this.location = new Microsoft.Maps.Location(this.centerLat, this.centerLong);\r\n edit_pin = new Microsoft.Maps.Pushpin(this.location, { draggable: true, text: \"center\", visible: true });\r\n //edit_pin.iref = \"center\";\r\n this.map.entities.push(edit_pin);\r\n }\r\n }, \"json\");\r\n }\r\n else {\r\n if (this.multipolygon().length > 1) {\r\n this.location = new Microsoft.Maps.Location(this.centerLat, this.centerLong);\r\n edit_pin = new Microsoft.Maps.Pushpin(this.location, {\r\n draggable: true,\r\n text: \"center\",\r\n visible: true\r\n });\r\n //edit_pin.iref = \"center\";\r\n this.map.entities.push(edit_pin);\r\n }\r\n }\r\n };\r\n _this.createPolygonJson = function () {\r\n var json = { Polygons: [] };\r\n for (var i = 0; i < this.multipolygon().length; i++) {\r\n var coordsLength = this.multipolygon()[i].pointsList().length;\r\n if (coordsLength > 0) {\r\n json.Polygons.push({ Coordinates: [] });\r\n for (var j = 0; j < coordsLength; j++) {\r\n json.Polygons[i].Coordinates.push({ latitude: this.multipolygon()[i].pointsList()[j].latitude(), longitude: this.multipolygon()[i].pointsList()[j].longitude() });\r\n }\r\n }\r\n }\r\n $(\"#MultiPolygonJson\").val(JSON.stringify(json));\r\n };\r\n _this.clearPins = function () {\r\n for (var i = this.multipolygon().length - 1; i >= 0; i--) {\r\n this.multipolygon()[i].pointsList.removeAll();\r\n this.points[i].removeAll();\r\n if (i > 0) {\r\n this.multipolygon.splice(i, 1);\r\n this.points.splice(i, 1);\r\n }\r\n }\r\n this.render();\r\n this.currentpolygon = 0;\r\n };\r\n _this.validateAllPolygonsClosedEvent = function (event) {\r\n this.cleanUpExtraPins();\r\n if (!this.validateAllPolygonsClosed()) {\r\n alert(\"There needs to be at least one shape and all shapes must be closed.\");\r\n event.stopImmediatePropagation();\r\n return false;\r\n }\r\n };\r\n _this.validateAllPolygonsClosed = function () {\r\n if (this.multipolygon == null || this.multipolygon().length == 0 || this.multipolygon()[0] == null || this.multipolygon()[0].pointsList().length == 0) {\r\n return false;\r\n }\r\n for (var i = 0; i < this.multipolygon().length; i++) {\r\n if (!this.isClosed(i)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n return _this;\r\n }\r\n return PolygonCreator;\r\n }(Maps.BingMaps));\r\n Maps.PolygonCreator = PolygonCreator;\r\n })(Maps = Wdot.Maps || (Wdot.Maps = {}));\r\n})(Wdot || (Wdot = {}));"]}