//>>built
require({cache:{"dojox/geo/openlayers/widget/Map":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/array dojo/dom-geometry dojo/query dijit/_Widget ../_base ../Map ../Layer ../GfxLayer".split(" "),function(h,n,d,p,b,a,f,k,e,c){return n("dojox.geo.openlayers.widget.Map",a,{baseLayerType:f.BaseLayerType.OSM,initialLocation:null,touchHandler:!1,map:null,startup:function(){this.inherited(arguments);this.map.initialFit({initialLocation:this.initialLocation})},buildRendering:function(){this.inherited(arguments);
this.map=new k(this.domNode,{baseLayerType:this.baseLayerType,touchHandler:this.touchHandler});this._makeLayers()},_makeLayers:function(){var a=b("\x3e .layer",this.domNode);d.forEach(a,function(g){var a=g.getAttribute("type");g=g.getAttribute("name");if(a=h.getObject("dojox.geo.openlayers."+a))(a=new a(g,{}))&&this.map.addLayer(a)},this)},resize:function(a,g){var c=this.map.getOLMap(),f;switch(arguments.length){case 1:f=h.mixin({},a);p.setMarginBox(c.div,f);break;case 2:f={w:arguments[0],h:arguments[1]},
p.setMarginBox(c.div,f)}c.updateSize()}})})},"dojox/geo/openlayers/_base":function(){define(["dojo/_base/lang"],function(h){h=h.getObject("dojox.geo.openlayers",!0);h.BaseLayerType={OSM:"OSM",Transport:"OSM.Transport",WMS:"WMS",GOOGLE:"Google",VIRTUAL_EARTH:"VirtualEarth",BING:"VirtualEarth",YAHOO:"Yahoo",ARCGIS:"ArcGIS"};h.EPSG4326=new OpenLayers.Projection("EPSG:4326");var n=/^\s*(\d{1,3})[D\u00b0]\s*(\d{1,2})[M']\s*(\d{1,2}\.?\d*)\s*(S|"|'')\s*([NSEWnsew]{0,1})\s*$/i;h.parseDMS=function(d,h){var b=
n.exec(d);if(null==b||5>b.length)return parseFloat(d);var a=parseFloat(b[1]),f=parseFloat(b[2]),k=parseFloat(b[3]),b=b[5];if(h){b=b.toLowerCase();a+=(f+k/60)/60;if("w"==b||"s"==b)a=-a;return a}return[a,f,k,b]};return h})},"dojox/geo/openlayers/Map":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/json dojo/dom dojo/dom-style ./_base ./TouchInteractionSupport ./Layer ./Patch".split(" "),function(h,n,d,p,b,a,f,k,e,c,l){h.experimental("dojox.geo.openlayers.Map");
l.patchGFX();return n("dojox.geo.openlayers.Map",null,{olMap:null,_tp:null,constructor:function(g,c){c||(c={});g=a.byId(g);this._tp={x:0,y:0};var f=c.openLayersMapOptions;f||(f={controls:[new OpenLayers.Control.ScaleLine({maxWidth:200}),new OpenLayers.Control.Navigation]});if(c.accessible){var k=new OpenLayers.Control.KeyboardDefaults;f.controls||(f.controls=[]);f.controls.push(k)}this.olMap=f=new OpenLayers.Map(g,f);this._layerDictionary={olLayers:[],layers:[]};c.touchHandler&&(this._touchControl=
new e(f));f=this._createBaseLayer(c);this.addLayer(f);this.initialFit(c)},initialFit:function(g){(g=g.initialLocation)||(g=[-160,70,160,-70]);this.fitTo(g)},setBaseLayerType:function(g){if(g==this.baseLayerType)return null;var a=null;"string"==typeof g?(a={baseLayerName:g,baseLayerType:g},this.baseLayerType=g):"object"==typeof g&&(a=g,this.baseLayerType=a.baseLayerType);g=null;if(null!=a&&(g=this._createBaseLayer(a),null!=g)){var a=this.olMap,c=a.getZoom(),f=a.getCenter(),e=!!f&&!!a.baseLayer&&!!a.baseLayer.map;
if(e){var b=a.getProjectionObject();null!=b&&(f=f.transform(b,k.EPSG4326))}b=a.baseLayer;null!=b&&(b=this._getLayer(b),this.removeLayer(b));null!=g&&this.addLayer(g);e&&(b=a.getProjectionObject(),null!=b&&(f=f.transform(k.EPSG4326,b)),a.setCenter(f,c))}return g},getBaseLayerType:function(){return this.baseLayerType},getScale:function(g){var a=null,a=this.olMap;if(g){if(!a.getUnits())return null;g=OpenLayers.INCHES_PER_UNIT;a=(a.getGeodesicPixelSize().w||1E-6)*g.km*OpenLayers.DOTS_PER_INCH}else a=
a.getScale();return a},getOLMap:function(){return this.olMap},_createBaseLayer:function(g){var a=null,f=g.baseLayerType,e=g.baseLayerUrl,b=g.baseLayerName;g=g.baseLayerOptions;b||(b=f);g||(g={});switch(f){case k.BaseLayerType.OSM:g.transitionEffect="resize";a=new c(b,{olLayer:new OpenLayers.Layer.OSM(b,e,g)});break;case k.BaseLayerType.Transport:g.transitionEffect="resize";a=new c(b,{olLayer:new OpenLayers.Layer.OSM.TransportMap(b,e,g)});break;case k.BaseLayerType.WMS:e||(e="http://labs.metacarta.com/wms/vmap0",
g.layers||(g.layers="basic"));a=new c(b,{olLayer:new OpenLayers.Layer.WMS(b,e,g,{transitionEffect:"resize"})});break;case k.BaseLayerType.GOOGLE:a=new c(b,{olLayer:new OpenLayers.Layer.Google(b,g)});break;case k.BaseLayerType.VIRTUAL_EARTH:a=new c(b,{olLayer:new OpenLayers.Layer.VirtualEarth(b,g)});break;case k.BaseLayerType.YAHOO:a=new c(b,{olLayer:new OpenLayers.Layer.Yahoo(b,g)});break;case k.BaseLayerType.ARCGIS:e||(e="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export"),
a=new c(b,{olLayer:new OpenLayers.Layer.ArcGIS93Rest(b,e,g,{})})}null==a&&(f instanceof OpenLayers.Layer?a=f:(g.transitionEffect="resize",a=new c(b,{olLayer:new OpenLayers.Layer.OSM(b,e,g)}),this.baseLayerType=k.BaseLayerType.OSM));return a},removeLayer:function(g){var a=this.olMap,c=p.indexOf(this._layerDictionary.layers,g);0<c&&this._layerDictionary.layers.splice(c,1);g=g.olLayer;var f=p.indexOf(this._layerDictionary.olLayers,g);0<f&&this._layerDictionary.olLayers.splice(c,f);a.removeLayer(g,!1)},
layerIndex:function(g,a){var c=this.olMap;if(!a)return c.getLayerIndex(g.olLayer);c.setLayerIndex(g.olLayer,a);this._layerDictionary.layers.sort(function(a,g){return c.getLayerIndex(a.olLayer)-c.getLayerIndex(g.olLayer)});this._layerDictionary.olLayers.sort(function(a,g){return c.getLayerIndex(a)-c.getLayerIndex(g)});return a},addLayer:function(a){a.dojoMap=this;var c=this.olMap,f=a.olLayer;this._layerDictionary.olLayers.push(f);this._layerDictionary.layers.push(a);c.addLayer(f);a.added()},_getLayer:function(a){a=
p.indexOf(this._layerDictionary.olLayers,a);return-1!=a?this._layerDictionary.layers[a]:null},getLayer:function(a,c){var f=this.olMap.getBy("layers",a,c),b=[];p.forEach(f,function(a){b.push(this._getLayer(a))},this);return b},getLayerCount:function(){var a=this.olMap;return null==a.layers?0:a.layers.length},fitTo:function(a){var c=this.olMap,f=k.EPSG4326;if(null==a)a=this.transformXY(0,0,f),c.setCenter(new OpenLayers.LonLat(a.x,a.y));else{var e=null,d="string"==typeof a?b.fromJson(a):a,l;if(d.hasOwnProperty("bounds")){var h=
d.bounds,e=new OpenLayers.Bounds;l=this.transformXY(h[0],h[1],f);e.left=l.x;e.top=l.y;l=this.transformXY(h[2],h[3],f);e.right=l.x;e.bottom=l.y}null==e&&d.hasOwnProperty("position")&&(h=d.position,d=d.hasOwnProperty("extent")?d.extent:1,"string"==typeof d&&(d=parseFloat(d)),e=new OpenLayers.Bounds,l=this.transformXY(h[0]-d,h[1]+d,f),e.left=l.x,e.top=l.y,l=this.transformXY(h[0]+d,h[1]-d,f),e.right=l.x,e.bottom=l.y);null==e&&4==a.length&&(e=new OpenLayers.Bounds,l=this.transformXY(a[0],a[1],f),e.left=
l.x,e.top=l.y,l=this.transformXY(a[2],a[3],f),e.right=l.x,e.bottom=l.y);null!=e&&c.zoomToExtent(e,!0)}},transform:function(a,c,f){return this.transformXY(a.x,a.y,c,f)},transformXY:function(a,c,f,e){var b=this._tp;b.x=a;b.y=c;f||(f=k.EPSG4326);e||(e=this.olMap.getProjectionObject());return b=OpenLayers.Projection.transform(b,f,e)}})})},"dojox/geo/openlayers/TouchInteractionSupport":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/html dojo/_base/lang dojo/_base/event dojo/_base/window".split(" "),
function(h,n,d,p,b,a){return h("dojox.geo.openlayers.TouchInteractionSupport",null,{_map:null,_centerTouchLocation:null,_touchMoveListener:null,_touchEndListener:null,_initialFingerSpacing:null,_initialScale:null,_tapCount:null,_tapThreshold:null,_lastTap:null,constructor:function(a){this._map=a;this._centerTouchLocation=new OpenLayers.LonLat(0,0);a=this._map.div;n.connect(a,"touchstart",this,this._touchStartHandler);n.connect(a,"touchmove",this,this._touchMoveHandler);n.connect(a,"touchend",this,
this._touchEndHandler);this._tapCount=0;this._lastTap={x:0,y:0};this._tapThreshold=100},_getTouchBarycenter:function(a){var b=a.touches;a=b[0];var e=null,e=1<b.length?b[1]:b[0],b=d.marginBox(this._map.div);return{x:(a.pageX+e.pageX)/2-b.l,y:(a.pageY+e.pageY)/2-b.t}},_getFingerSpacing:function(a){a=a.touches;var b=-1;2<=a.length&&(b=a[1].pageX-a[0].pageX,a=a[1].pageY-a[0].pageY,b=Math.sqrt(b*b+a*a));return b},_isDoubleTap:function(a){var b=!1;a=a.touches;if(0<this._tapCount&&1==a.length){var e=a[0].pageX-
this._lastTap.x,c=a[0].pageY-this._lastTap.y;e*e+c*c<this._tapThreshold?b=!0:this._tapCount=0}this._tapCount++;this._lastTap.x=a[0].pageX;this._lastTap.y=a[0].pageY;setTimeout(p.hitch(this,function(){this._tapCount=0}),300);return b},_doubleTapHandler:function(a){a=a.touches;var b=d.marginBox(this._map.div);a=this._map.getLonLatFromPixel(new OpenLayers.Pixel(a[0].pageX-b.l,a[0].pageY-b.t));this._map.setCenter(new OpenLayers.LonLat(a.lon,a.lat),this._map.getZoom()+1)},_touchStartHandler:function(f){b.stop(f);
if(this._isDoubleTap(f))this._doubleTapHandler(f);else{var k=this._getTouchBarycenter(f);this._centerTouchLocation=this._map.getLonLatFromPixel(new OpenLayers.Pixel(k.x,k.y));this._initialFingerSpacing=this._getFingerSpacing(f);this._initialScale=this._map.getScale();this._touchMoveListener||(this._touchMoveListener=n.connect(a.global,"touchmove",this,this._touchMoveHandler));this._touchEndListener||(this._touchEndListener=n.connect(a.global,"touchend",this,this._touchEndHandler))}},_touchEndHandler:function(a){b.stop(a);
0==a.touches.length?(this._touchMoveListener&&(n.disconnect(this._touchMoveListener),this._touchMoveListener=null),this._touchEndListener&&(n.disconnect(this._touchEndListener),this._touchEndListener=null)):(a=this._getTouchBarycenter(a),this._centerTouchLocation=this._map.getLonLatFromPixel(new OpenLayers.Pixel(a.x,a.y)))},_touchMoveHandler:function(a){b.stop(a);var k=this._getTouchBarycenter(a),e=this._map.getLonLatFromPixel(new OpenLayers.Pixel(k.x,k.y)),k=e.lon-this._centerTouchLocation.lon,e=
e.lat-this._centerTouchLocation.lat,c=1;2<=a.touches.length&&(c=this._getFingerSpacing(a)/this._initialFingerSpacing,this._map.zoomToScale(this._initialScale/c));a=this._map.getCenter();this._map.setCenter(new OpenLayers.LonLat(a.lon-k,a.lat-e))}})})},"dojox/geo/openlayers/Layer":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/sniff","./Feature"],function(h,n,d,p,b){return h("dojox.geo.openlayers.Layer",null,{constructor:function(a,b){var k=b?b.olLayer:null;
k||(k=n.delegate(new OpenLayers.Layer(a,b)));this.olLayer=k;this._features=null;this.olLayer.events.register("moveend",this,n.hitch(this,this.moveTo))},renderFeature:function(a){a.render()},getDojoMap:function(){return this.dojoMap},addFeature:function(a){n.isArray(a)?d.forEach(a,function(a){this.addFeature(a)},this):(null==this._features&&(this._features=[]),this._features.push(a),a._setLayer(this))},removeFeature:function(a){var b=this._features;if(null!=b)if(a instanceof Array)a=a.slice(0),d.forEach(a,
function(a){this.removeFeature(a)},this);else{var k=d.indexOf(b,a);-1!=k&&b.splice(k,1);a._setLayer(null);a.remove()}},removeFeatureAt:function(a){var b=this._features,k=b[a];k&&(b.splice(a,1),k._setLayer(null),k.remove())},getFeatures:function(){return this._features},getFeatureAt:function(a){return null==this._features?void 0:this._features[a]},getFeatureCount:function(){return null==this._features?0:this._features.length},clear:function(){var a=this.getFeatures();this.removeFeature(a)},moveTo:function(a){a.zoomChanged&&
null!=this._features&&d.forEach(this._features,function(a){this.renderFeature(a)},this)},redraw:function(){p.isIE?setTimeout(n.hitch(this,function(){this.olLayer.redraw()},0)):this.olLayer.redraw()},added:function(){}})})},"dojox/geo/openlayers/Feature":function(){define(["dojo/_base/kernel","dojo/_base/declare","./_base"],function(h,n,d){return n("dojox.geo.openlayers.Feature",null,{constructor:function(){this._layer=null;this._coordSys=d.EPSG4326},getCoordinateSystem:function(){return this._coordSys},
setCoordinateSystem:function(d){this._coordSys=d},getLayer:function(){return this._layer},_setLayer:function(d){this._layer=d},render:function(){},remove:function(){},_getLocalXY:function(d){var b=d.x;d=d.y;var a=this.getLayer(),f=a.olLayer.map.getResolution(),a=a.olLayer.getExtent();return[b/f+-a.left/f,a.top/f-d/f]}})})},"dojox/geo/openlayers/Patch":function(){define(["dojo/_base/kernel","dojo/_base/lang","dojo/_base/sniff","dojox/gfx","dojox/gfx/shape"],function(h,n,d,p,b){h=n.getObject("geo.openlayers",
!0,dojox);h.Patch={patchMethod:function(a,b,k,e){var c=a.prototype[b];a.prototype[b]=function(){k&&k.call(this,b,arguments);var a=c.apply(this,arguments);e&&(a=e.call(this,b,a,arguments)||a);return a}},patchGFX:function(){var a=function(){this.rawNode.path||(this.rawNode.path={})},f=function(){this.rawNode.fill&&!this.rawNode.fill.colors&&(this.rawNode.fill.colors={})};8>=d.isIE&&"vml"===p.renderer&&(this.patchMethod(p.Line,"setShape",a,null),this.patchMethod(p.Polyline,"setShape",a,null),this.patchMethod(p.Path,
"setShape",a,null),this.patchMethod(b.Shape,"setFill",f,null))}};return h.Patch})},"dojox/gfx":function(){define(["dojo/_base/lang","./gfx/_base","./gfx/renderer!"],function(h,n,d){n.switchTo(d);return n})},"dojox/gfx/_base":function(){define("dojo/_base/kernel dojo/_base/lang dojo/_base/Color dojo/_base/sniff dojo/_base/window dojo/_base/array dojo/dom dojo/dom-construct dojo/dom-geometry".split(" "),function(h,n,d,p,b,a,f,k,e){var c=n.getObject("dojox.gfx",!0),l=c._base={};c._hasClass=function(a,
g){var c=a.getAttribute("className");return c&&0<=(" "+c+" ").indexOf(" "+g+" ")};c._addClass=function(a,g){var c=a.getAttribute("className")||"";if(!c||0>(" "+c+" ").indexOf(" "+g+" "))a.setAttribute("className",c+(c?" ":"")+g)};c._removeClass=function(a,g){var c=a.getAttribute("className");c&&a.setAttribute("className",c.replace(RegExp("(^|\\s+)"+g+"(\\s+|$)"),"$1$2"))};l._getFontMeasurements=function(){var a={"1em":0,"1ex":0,"100%":0,"12pt":0,"16px":0,"xx-small":0,"x-small":0,small:0,medium:0,
large:0,"x-large":0,"xx-large":0},g,c;p("ie")&&(c=b.doc.documentElement.style.fontSize||"",c||(b.doc.documentElement.style.fontSize="100%"));var e=k.create("div",{style:{position:"absolute",left:"0",top:"-100px",width:"30px",height:"1000em",borderWidth:"0",margin:"0",padding:"0",outline:"none",lineHeight:"1",overflow:"hidden"}},b.body());for(g in a)e.style.fontSize=g,a[g]=16*Math.round(12*e.offsetHeight/16)/12/1E3;p("ie")&&(b.doc.documentElement.style.fontSize=c);b.body().removeChild(e);return a};
var g=null;l._getCachedFontMeasurements=function(a){if(a||!g)g=l._getFontMeasurements();return g};var q=null,t={};l._getTextBox=function(a,g,c){var f,d,l=arguments.length,A;q||(q=k.create("div",{style:{position:"absolute",top:"-10000px",left:"0",visibility:"hidden"}},b.body()));f=q;f.className="";d=f.style;d.borderWidth="0";d.margin="0";d.padding="0";d.outline="0";if(1<l&&g)for(A in g)A in t||(d[A]=g[A]);2<l&&c&&(f.className=c);f.innerHTML=a;f.getBoundingClientRect?(d=f.getBoundingClientRect(),d=
{l:d.left,t:d.top,w:d.width||d.right-d.left,h:d.height||d.bottom-d.top}):d=e.getMarginBox(f);f.innerHTML="";return d};l._computeTextLocation=function(a,g,c,b){var e={};switch(a.align){case "end":e.x=a.x-g;break;case "middle":e.x=a.x-g/2;break;default:e.x=a.x}e.y=a.y-c*(b?0.75:1);return e};l._computeTextBoundingBox=function(a){if(!c._base._isRendered(a))return{x:0,y:0,width:0,height:0};var g;g=a.getShape();var b=a.getFont()||c.defaultFont;a=a.getTextWidth();b=c.normalizedLength(b.size);g=l._computeTextLocation(g,
a,b,!0);return{x:g.x,y:g.y,width:a,height:b}};l._isRendered=function(a){for(a=a.parent;a&&a.getParent;)a=a.parent;return null!==a};var m=0;l._getUniqueId=function(){var a;do a=h._scopeName+"xUnique"+ ++m;while(f.byId(a));return a};var v=p("pointer-events")?"touchAction":p("MSPointer")?"msTouchAction":null;l._fixMsTouchAction=v?function(a){a.rawNode.style[v]="none"}:function(){};n.mixin(c,{defaultPath:{type:"path",path:""},defaultPolyline:{type:"polyline",points:[]},defaultRect:{type:"rect",x:0,y:0,
width:100,height:100,r:0},defaultEllipse:{type:"ellipse",cx:0,cy:0,rx:200,ry:100},defaultCircle:{type:"circle",cx:0,cy:0,r:100},defaultLine:{type:"line",x1:0,y1:0,x2:100,y2:100},defaultImage:{type:"image",x:0,y:0,width:0,height:0,src:""},defaultText:{type:"text",x:0,y:0,text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultTextPath:{type:"textpath",text:"",align:"start",decoration:"none",rotated:!1,kerning:!0},defaultStroke:{type:"stroke",color:"black",style:"solid",width:1,cap:"butt",
join:4},defaultLinearGradient:{type:"linear",x1:0,y1:0,x2:100,y2:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultRadialGradient:{type:"radial",cx:0,cy:0,r:100,colors:[{offset:0,color:"black"},{offset:1,color:"white"}]},defaultPattern:{type:"pattern",x:0,y:0,width:0,height:0,src:""},defaultFont:{type:"font",style:"normal",variant:"normal",weight:"normal",size:"10pt",family:"serif"},getDefault:function(){var a={};return function(g){var b=a[g];if(b)return new b;b=a[g]=new Function;
b.prototype=c["default"+g];return new b}}(),normalizeColor:function(a){return a instanceof d?a:new d(a)},normalizeParameters:function(a,g){var c;if(g){var b={};for(c in a)c in g&&!(c in b)&&(a[c]=g[c])}return a},makeParameters:function(a,g){var c=null;if(!g)return n.delegate(a);var b={};for(c in a)c in b||(b[c]=n.clone(c in g?g[c]:a[c]));return b},formatNumber:function(a,g){var c=a.toString();if(0<=c.indexOf("e"))c=a.toFixed(4);else{var b=c.indexOf(".");0<=b&&5<c.length-b&&(c=a.toFixed(4))}return 0>
a?c:g?" "+c:c},makeFontString:function(a){return a.style+" "+a.variant+" "+a.weight+" "+a.size+" "+a.family},splitFontString:function(a){var g=c.getDefault("Font");a=a.split(/\s+/);if(!(5>a.length)){g.style=a[0];g.variant=a[1];g.weight=a[2];var b=a[3].indexOf("/");g.size=0>b?a[3]:a[3].substring(0,b);var e=4;0>b&&("/"==a[4]?e=6:"/"==a[4].charAt(0)&&(e=5));e<a.length&&(g.family=a.slice(e).join(" "))}return g},cm_in_pt:72/2.54,mm_in_pt:7.2/2.54,px_in_pt:function(){return c._base._getCachedFontMeasurements()["12pt"]/
12},pt2px:function(a){return a*c.px_in_pt()},px2pt:function(a){return a/c.px_in_pt()},normalizedLength:function(a){if(0===a.length)return 0;if(2<a.length){var g=c.px_in_pt(),b=parseFloat(a);switch(a.slice(-2)){case "px":return b;case "pt":return b*g;case "in":return 72*b*g;case "pc":return 12*b*g;case "mm":return b*c.mm_in_pt*g;case "cm":return b*c.cm_in_pt*g}}return parseFloat(a)},pathVmlRegExp:/([A-Za-z]+)|(\d+(\.\d+)?)|(\.\d+)|(-\d+(\.\d+)?)|(-\.\d+)/g,pathSvgRegExp:/([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g,
equalSources:function(a,g){return a&&g&&a===g},switchTo:function(g){var b="string"==typeof g?c[g]:g;b&&(a.forEach("Group Rect Ellipse Circle Line Polyline Image Text Path TextPath Surface createSurface fixTarget".split(" "),function(a){c[a]=b[a]}),"string"==typeof g?c.renderer=g:a.some(["svg","vml","canvas","canvasWithEvents","silverlight"],function(a){return c.renderer=c[a]&&c[a].Surface===c.Surface?a:null}))}});return c})},"dojox/gfx/renderer":function(){define(["./_base","dojo/_base/lang","dojo/_base/sniff",
"dojo/_base/window","dojo/_base/config"],function(h,n,d,p,b){var a=null;d.add("vml",function(a,b,e){e.innerHTML='\x3cv:shape adj\x3d"1"/\x3e';a="adj"in e.firstChild;e.innerHTML="";return a});return{load:function(f,k,e){function c(){k(["dojox/gfx/"+l],function(g){h.renderer=l;a=g;e(g)})}if(a&&"force"!=f)e(a);else{var l=b.forceGfxRenderer;f=!l&&(n.isString(b.gfxRenderer)?b.gfxRenderer:"svg,vml,canvas,silverlight").split(",");for(var g,q;!l&&f.length;)switch(f.shift()){case "svg":"SVGAngle"in p.global&&
(l="svg");break;case "vml":d("vml")&&(l="vml");break;case "silverlight":try{d("ie")?(g=new ActiveXObject("AgControl.AgControl"))&&g.IsVersionSupported("1.0")&&(q=!0):navigator.plugins["Silverlight Plug-In"]&&(q=!0)}catch(t){q=!1}finally{g=null}q&&(l="silverlight");break;case "canvas":p.global.CanvasRenderingContext2D&&(l="canvas")}"canvas"===l&&!1!==b.canvasEvents&&(l="canvasWithEvents");"svg"==l&&"undefined"!=typeof window.svgweb?window.svgweb.addOnLoad(c):c()}}}})},"dojox/gfx/shape":function(){define("./_base dojo/_base/lang dojo/_base/declare dojo/_base/kernel dojo/_base/sniff dojo/on dojo/_base/array dojo/dom-construct dojo/_base/Color ./matrix".split(" "),
function(h,n,d,p,b,a,f,k,e,c){var l=h.shape={};l.Shape=d("dojox.gfx.shape.Shape",null,{constructor:function(){this.parentMatrix=this.parent=this.bbox=this.strokeStyle=this.fillStyle=this.matrix=this.shape=this.rawNode=null;if(b("gfxRegistry")){var a=l.register(this);this.getUID=function(){return a}}},destroy:function(){b("gfxRegistry")&&l.dispose(this);this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=null},getNode:function(){return this.rawNode},getShape:function(){return this.shape},
getTransform:function(){return this.matrix},getFill:function(){return this.fillStyle},getStroke:function(){return this.strokeStyle},getParent:function(){return this.parent},getBoundingBox:function(){return this.bbox},getTransformedBoundingBox:function(){var a=this.getBoundingBox();if(!a)return null;var b=this._getRealMatrix();return[c.multiplyPoint(b,a.x,a.y),c.multiplyPoint(b,a.x+a.width,a.y),c.multiplyPoint(b,a.x+a.width,a.y+a.height),c.multiplyPoint(b,a.x,a.y+a.height)]},getEventSource:function(){return this.rawNode},
setClip:function(a){this.clip=a},getClip:function(){return this.clip},setShape:function(a){this.shape=h.makeParameters(this.shape,a);this.bbox=null;return this},setFill:function(a){if(!a)return this.fillStyle=null,this;var c=null;if("object"==typeof a&&"type"in a)switch(a.type){case "linear":c=h.makeParameters(h.defaultLinearGradient,a);break;case "radial":c=h.makeParameters(h.defaultRadialGradient,a);break;case "pattern":c=h.makeParameters(h.defaultPattern,a)}else c=h.normalizeColor(a);this.fillStyle=
c;return this},setStroke:function(a){if(!a)return this.strokeStyle=null,this;if("string"==typeof a||n.isArray(a)||a instanceof e)a={color:a};a=this.strokeStyle=h.makeParameters(h.defaultStroke,a);a.color=h.normalizeColor(a.color);return this},setTransform:function(a){this.matrix=c.clone(a?c.normalize(a):c.identity);return this._applyTransform()},_applyTransform:function(){return this},moveToFront:function(){var a=this.getParent();a&&(a._moveChildToFront(this),this._moveToFront());return this},moveToBack:function(){var a=
this.getParent();a&&(a._moveChildToBack(this),this._moveToBack());return this},_moveToFront:function(){},_moveToBack:function(){},applyRightTransform:function(a){return a?this.setTransform([this.matrix,a]):this},applyLeftTransform:function(a){return a?this.setTransform([a,this.matrix]):this},applyTransform:function(a){return a?this.setTransform([this.matrix,a]):this},removeShape:function(a){this.parent&&this.parent.remove(this,a);return this},_setParent:function(a,c){this.parent=a;return this._updateParentMatrix(c)},
_updateParentMatrix:function(a){this.parentMatrix=a?c.clone(a):null;return this._applyTransform()},_getRealMatrix:function(){for(var a=this.matrix,b=this.parent;b;)b.matrix&&(a=c.multiply(b.matrix,a)),b=b.parent;return a}});l._eventsProcessing={on:function(c,b){return a(this.getEventSource(),c,l.fixCallback(this,h.fixTarget,b))},connect:function(a,c,b){"on"==a.substring(0,2)&&(a=a.substring(2));return this.on(a,b?n.hitch(c,b):c)},disconnect:function(a){return a.remove()}};l.fixCallback=function(a,
c,b,e){e||(e=b,b=null);if(n.isString(e)){b=b||p.global;if(!b[e])throw['dojox.gfx.shape.fixCallback: scope["',e,'"] is null (scope\x3d"',b,'")'].join("");return function(f){return c(f,a)?b[e].apply(b,arguments||[]):void 0}}return!b?function(f){return c(f,a)?e.apply(b,arguments):void 0}:function(f){return c(f,a)?e.apply(b,arguments||[]):void 0}};n.extend(l.Shape,l._eventsProcessing);l.Container={_init:function(){this.children=[];this._batch=0},openBatch:function(){return this},closeBatch:function(){return this},
add:function(a){var c=a.getParent();c&&c.remove(a,!0);this.children.push(a);return a._setParent(this,this._getRealMatrix())},remove:function(a,c){for(var b=0;b<this.children.length;++b)if(this.children[b]==a){c||(a.parent=null,a.parentMatrix=null);this.children.splice(b,1);break}return this},clear:function(a){for(var c,b=0;b<this.children.length;++b)c=this.children[b],c.parent=null,c.parentMatrix=null,a&&c.destroy();this.children=[];return this},getBoundingBox:function(){if(this.children){var a=null;
f.forEach(this.children,function(b){var e=b.getBoundingBox();e&&((b=b.getTransform())&&(e=c.multiplyRectangle(b,e)),a?(a.x=Math.min(a.x,e.x),a.y=Math.min(a.y,e.y),a.endX=Math.max(a.endX,e.x+e.width),a.endY=Math.max(a.endY,e.y+e.height)):a={x:e.x,y:e.y,endX:e.x+e.width,endY:e.y+e.height})});a&&(a.width=a.endX-a.x,a.height=a.endY-a.y);return a}return null},_moveChildToFront:function(a){for(var c=0;c<this.children.length;++c)if(this.children[c]==a){this.children.splice(c,1);this.children.push(a);break}return this},
_moveChildToBack:function(a){for(var c=0;c<this.children.length;++c)if(this.children[c]==a){this.children.splice(c,1);this.children.unshift(a);break}return this}};l.Surface=d("dojox.gfx.shape.Surface",null,{constructor:function(){this._parent=this.rawNode=null;this._nodes=[];this._events=[]},destroy:function(){f.forEach(this._nodes,k.destroy);this._nodes=[];f.forEach(this._events,function(a){a&&a.remove()});this._events=[];this.rawNode=null;if(b("ie"))for(;this._parent.lastChild;)k.destroy(this._parent.lastChild);
else this._parent.innerHTML="";this._parent=null},getEventSource:function(){return this.rawNode},_getRealMatrix:function(){return null},isLoaded:!0,onLoad:function(a){},whenLoaded:function(c,b){var e=n.hitch(c,b);if(this.isLoaded)e(this);else a.once(this,"load",function(a){e(a)})}});n.extend(l.Surface,l._eventsProcessing);l.Rect=d("dojox.gfx.shape.Rect",l.Shape,{constructor:function(a){this.shape=h.getDefault("Rect");this.rawNode=a},getBoundingBox:function(){return this.shape}});l.Ellipse=d("dojox.gfx.shape.Ellipse",
l.Shape,{constructor:function(a){this.shape=h.getDefault("Ellipse");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.rx,y:a.cy-a.ry,width:2*a.rx,height:2*a.ry}}return this.bbox}});l.Circle=d("dojox.gfx.shape.Circle",l.Shape,{constructor:function(a){this.shape=h.getDefault("Circle");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.r,y:a.cy-a.r,width:2*a.r,height:2*a.r}}return this.bbox}});l.Line=d("dojox.gfx.shape.Line",
l.Shape,{constructor:function(a){this.shape=h.getDefault("Line");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:Math.min(a.x1,a.x2),y:Math.min(a.y1,a.y2),width:Math.abs(a.x2-a.x1),height:Math.abs(a.y2-a.y1)}}return this.bbox}});l.Polyline=d("dojox.gfx.shape.Polyline",l.Shape,{constructor:function(a){this.shape=h.getDefault("Polyline");this.rawNode=a},setShape:function(a,c){a&&a instanceof Array?(this.inherited(arguments,[{points:a}]),c&&this.shape.points.length&&
this.shape.points.push(this.shape.points[0])):this.inherited(arguments,[a]);return this},_normalizePoints:function(){var a=this.shape.points,c=a&&a.length;if(c&&"number"==typeof a[0]){for(var b=[],e=0;e<c;e+=2)b.push({x:a[e],y:a[e+1]});this.shape.points=b}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){for(var a=this.shape.points,c=a.length,b=a[0],e=b.x,f=b.y,d=b.x,k=b.y,l=1;l<c;++l)b=a[l],e>b.x&&(e=b.x),d<b.x&&(d=b.x),f>b.y&&(f=b.y),k<b.y&&(k=b.y);this.bbox={x:e,y:f,width:d-
e,height:k-f}}return this.bbox}});l.Image=d("dojox.gfx.shape.Image",l.Shape,{constructor:function(a){this.shape=h.getDefault("Image");this.rawNode=a},getBoundingBox:function(){return this.shape},setStroke:function(){return this},setFill:function(){return this}});l.Text=d(l.Shape,{constructor:function(a){this.fontStyle=null;this.shape=h.getDefault("Text");this.rawNode=a},getFont:function(){return this.fontStyle},setFont:function(a){this.fontStyle="string"==typeof a?h.splitFontString(a):h.makeParameters(h.defaultFont,
a);this._setFont();return this},getBoundingBox:function(){var a=null;this.getShape().text&&(a=h._base._computeTextBoundingBox(this));return a}});l.Creator={createShape:function(a){switch(a.type){case h.defaultPath.type:return this.createPath(a);case h.defaultRect.type:return this.createRect(a);case h.defaultCircle.type:return this.createCircle(a);case h.defaultEllipse.type:return this.createEllipse(a);case h.defaultLine.type:return this.createLine(a);case h.defaultPolyline.type:return this.createPolyline(a);
case h.defaultImage.type:return this.createImage(a);case h.defaultText.type:return this.createText(a);case h.defaultTextPath.type:return this.createTextPath(a)}return null},createGroup:function(){return this.createObject(h.Group)},createRect:function(a){return this.createObject(h.Rect,a)},createEllipse:function(a){return this.createObject(h.Ellipse,a)},createCircle:function(a){return this.createObject(h.Circle,a)},createLine:function(a){return this.createObject(h.Line,a)},createPolyline:function(a){return this.createObject(h.Polyline,
a)},createImage:function(a){return this.createObject(h.Image,a)},createText:function(a){return this.createObject(h.Text,a)},createPath:function(a){return this.createObject(h.Path,a)},createTextPath:function(a){return this.createObject(h.TextPath,{}).setText(a)},createObject:function(a,c){return null}};return l})},"dojox/gfx/matrix":function(){define(["./_base","dojo/_base/lang"],function(h,n){var d=h.matrix={},p={};d._degToRad=function(b){return p[b]||(p[b]=Math.PI*b/180)};d._radToDeg=function(b){return 180*
(b/Math.PI)};d.Matrix2D=function(b){if(b)if("number"==typeof b)this.xx=this.yy=b;else if(b instanceof Array){if(0<b.length){for(var a=d.normalize(b[0]),f=1;f<b.length;++f){var k=a,e=d.normalize(b[f]),a=new d.Matrix2D;a.xx=k.xx*e.xx+k.xy*e.yx;a.xy=k.xx*e.xy+k.xy*e.yy;a.yx=k.yx*e.xx+k.yy*e.yx;a.yy=k.yx*e.xy+k.yy*e.yy;a.dx=k.xx*e.dx+k.xy*e.dy+k.dx;a.dy=k.yx*e.dx+k.yy*e.dy+k.dy}n.mixin(this,a)}}else n.mixin(this,b)};n.extend(d.Matrix2D,{xx:1,xy:0,yx:0,yy:1,dx:0,dy:0});n.mixin(d,{identity:new d.Matrix2D,
flipX:new d.Matrix2D({xx:-1}),flipY:new d.Matrix2D({yy:-1}),flipXY:new d.Matrix2D({xx:-1,yy:-1}),translate:function(b,a){return 1<arguments.length?new d.Matrix2D({dx:b,dy:a}):new d.Matrix2D({dx:b.x,dy:b.y})},scale:function(b,a){return 1<arguments.length?new d.Matrix2D({xx:b,yy:a}):"number"==typeof b?new d.Matrix2D({xx:b,yy:b}):new d.Matrix2D({xx:b.x,yy:b.y})},rotate:function(b){var a=Math.cos(b);b=Math.sin(b);return new d.Matrix2D({xx:a,xy:-b,yx:b,yy:a})},rotateg:function(b){return d.rotate(d._degToRad(b))},
skewX:function(b){return new d.Matrix2D({xy:Math.tan(b)})},skewXg:function(b){return d.skewX(d._degToRad(b))},skewY:function(b){return new d.Matrix2D({yx:Math.tan(b)})},skewYg:function(b){return d.skewY(d._degToRad(b))},reflect:function(b,a){1==arguments.length&&(a=b.y,b=b.x);var f=b*b,k=a*a,e=f+k,c=2*b*a/e;return new d.Matrix2D({xx:2*f/e-1,xy:c,yx:c,yy:2*k/e-1})},project:function(b,a){1==arguments.length&&(a=b.y,b=b.x);var f=b*b,k=a*a,e=f+k,c=b*a/e;return new d.Matrix2D({xx:f/e,xy:c,yx:c,yy:k/e})},
normalize:function(b){return b instanceof d.Matrix2D?b:new d.Matrix2D(b)},isIdentity:function(b){return 1==b.xx&&0==b.xy&&0==b.yx&&1==b.yy&&0==b.dx&&0==b.dy},clone:function(b){var a=new d.Matrix2D,f;for(f in b)"number"==typeof b[f]&&("number"==typeof a[f]&&a[f]!=b[f])&&(a[f]=b[f]);return a},invert:function(b){b=d.normalize(b);var a=b.xx*b.yy-b.xy*b.yx;return b=new d.Matrix2D({xx:b.yy/a,xy:-b.xy/a,yx:-b.yx/a,yy:b.xx/a,dx:(b.xy*b.dy-b.yy*b.dx)/a,dy:(b.yx*b.dx-b.xx*b.dy)/a})},_multiplyPoint:function(b,
a,f){return{x:b.xx*a+b.xy*f+b.dx,y:b.yx*a+b.yy*f+b.dy}},multiplyPoint:function(b,a,f){b=d.normalize(b);return"number"==typeof a&&"number"==typeof f?d._multiplyPoint(b,a,f):d._multiplyPoint(b,a.x,a.y)},multiplyRectangle:function(b,a){var f=d.normalize(b);a=a||{x:0,y:0,width:0,height:0};if(d.isIdentity(f))return{x:a.x,y:a.y,width:a.width,height:a.height};var k=d.multiplyPoint(f,a.x,a.y),e=d.multiplyPoint(f,a.x,a.y+a.height),c=d.multiplyPoint(f,a.x+a.width,a.y),l=d.multiplyPoint(f,a.x+a.width,a.y+a.height),
f=Math.min(k.x,e.x,c.x,l.x),g=Math.min(k.y,e.y,c.y,l.y),h=Math.max(k.x,e.x,c.x,l.x),k=Math.max(k.y,e.y,c.y,l.y);return{x:f,y:g,width:h-f,height:k-g}},multiply:function(b){for(var a=d.normalize(b),f=1;f<arguments.length;++f){var k=a,e=d.normalize(arguments[f]),a=new d.Matrix2D;a.xx=k.xx*e.xx+k.xy*e.yx;a.xy=k.xx*e.xy+k.xy*e.yy;a.yx=k.yx*e.xx+k.yy*e.yx;a.yy=k.yx*e.xy+k.yy*e.yy;a.dx=k.xx*e.dx+k.xy*e.dy+k.dx;a.dy=k.yx*e.dx+k.yy*e.dy+k.dy}return a},_sandwich:function(b,a,f){return d.multiply(d.translate(a,
f),b,d.translate(-a,-f))},scaleAt:function(b,a,f,k){switch(arguments.length){case 4:return d._sandwich(d.scale(b,a),f,k);case 3:return"number"==typeof f?d._sandwich(d.scale(b),a,f):d._sandwich(d.scale(b,a),f.x,f.y)}return d._sandwich(d.scale(b),a.x,a.y)},rotateAt:function(b,a,f){return 2<arguments.length?d._sandwich(d.rotate(b),a,f):d._sandwich(d.rotate(b),a.x,a.y)},rotategAt:function(b,a,f){return 2<arguments.length?d._sandwich(d.rotateg(b),a,f):d._sandwich(d.rotateg(b),a.x,a.y)},skewXAt:function(b,
a,f){return 2<arguments.length?d._sandwich(d.skewX(b),a,f):d._sandwich(d.skewX(b),a.x,a.y)},skewXgAt:function(b,a,f){return 2<arguments.length?d._sandwich(d.skewXg(b),a,f):d._sandwich(d.skewXg(b),a.x,a.y)},skewYAt:function(b,a,f){return 2<arguments.length?d._sandwich(d.skewY(b),a,f):d._sandwich(d.skewY(b),a.x,a.y)},skewYgAt:function(b,a,f){return 2<arguments.length?d._sandwich(d.skewYg(b),a,f):d._sandwich(d.skewYg(b),a.x,a.y)}});h.Matrix2D=d.Matrix2D;return d})},"dojox/geo/openlayers/GfxLayer":function(){define("dojo/_base/declare dojo/_base/connect dojo/dom-style dojox/gfx dojox/gfx/matrix ./Feature ./Layer".split(" "),
function(h,n,d,p,b,a,f){return h("dojox.geo.openlayers.GfxLayer",f,{_viewport:null,constructor:function(a,b){var c=p.createSurface(this.olLayer.div,100,100);this._surface=c;c=b&&b.viewport?b.viewport:c.createGroup();this.setViewport(c);n.connect(this.olLayer,"onMapResize",this,"onMapResize");this.olLayer.getDataExtent=this.getDataExtent},getViewport:function(){return this._viewport},setViewport:function(a){this._viewport&&this._viewport.removeShape();this._viewport=a;this._surface.add(a)},onMapResize:function(){this._surfaceSize()},
setMap:function(a){this.inherited(arguments);this._surfaceSize()},getDataExtent:function(){return this._surface.getDimensions()},getSurface:function(){return this._surface},_surfaceSize:function(){var a=this.olLayer.map.getSize();this._surface.setDimensions(a.w,a.h)},moveTo:function(a){var e=d.get(this.olLayer.map.layerContainerDiv),c=parseInt(e.left),e=parseInt(e.top);if(a.zoomChanged||c||e)d.set(this.olLayer.div,{left:-c+"px",top:-e+"px"}),null!=this._features&&(this.getViewport().setTransform(b.translate(c,
e)),this.inherited(arguments))},added:function(){this.inherited(arguments);this._surfaceSize()}})})},"dojox/geo/openlayers/Collection":function(){define(["dojo/_base/declare","./Geometry"],function(h,n){return h("dojox.geo.openlayers.Collection",n,{coordinates:null,setGeometries:function(d){this.coordinates=d},getGeometries:function(){return this.coordinates}})})},"dojox/geo/openlayers/Geometry":function(){define(["dojo/_base/declare"],function(h){return h("dojox.geo.openlayers.Geometry",null,{coordinates:null,
shape:null,constructor:function(h){this.coordinates=h}})})},"dojox/geo/openlayers/GeometryFeature":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojox/gfx/matrix ./Point ./LineString ./Collection ./Feature".split(" "),function(h,n,d,p,b,a,f,k){return h("dojox.geo.openlayers.GeometryFeature",k,{constructor:function(a){this._geometry=a;this._shapeProperties={};this._stroke=this._fill=null},_createCollection:function(a){var c=this.getLayer(),b=c.getSurface();a=this.createShape(b,
a);c.getViewport().add(a);return a},_getCollectionShape:function(a){var c=a.shape;null==c&&(c=this._createCollection(a),a.shape=c);return c},renderCollection:function(e){void 0==e&&(e=this._geometry);s=this._getCollectionShape(e);var c=this.getShapeProperties();s.setShape(c);n.forEach(e.coordinates,function(c){if(c instanceof b)this.renderPoint(c);else if(c instanceof a)this.renderLineString(c);else if(c instanceof f)this.renderCollection(c);else throw Error();},this);this._applyStyle(e)},render:function(e){void 0==
e&&(e=this._geometry);if(e instanceof b)this.renderPoint(e);else if(e instanceof a)this.renderLineString(e);else if(e instanceof f)this.renderCollection(e);else throw Error();},getShapeProperties:function(){return this._shapeProperties},setShapeProperties:function(a){this._shapeProperties=a;return this},createShape:function(e,c){c||(c=this._geometry);var d=null;if(c instanceof b)d=e.createCircle();else if(c instanceof a)d=e.createPolyline();else if(c instanceof f){var k=e.createGroup();n.forEach(c.coordinates,
function(a){a=this.createShape(e,a);k.add(a)},this);d=k}else throw Error();return d},getShape:function(){var a=this._geometry;if(!a)return null;if(a.shape)return a.shape;this.render();return a.shape},_createPoint:function(a){var c=this.getLayer(),b=c.getSurface();a=this.createShape(b,a);c.getViewport().add(a);return a},_getPointShape:function(a){var c=a.shape;null==c&&(c=this._createPoint(a),a.shape=c);return c},renderPoint:function(a){void 0==a&&(a=this._geometry);var c=this.getLayer(),b=c.getDojoMap();
s=this._getPointShape(a);var f=d.mixin({},this._defaults.pointShape),f=d.mixin(f,this.getShapeProperties());s.setShape(f);f=this.getCoordinateSystem();b=b.transform(a.coordinates,f);f=this._getLocalXY(b);b=f[0];f=f[1];(c=c.getViewport().getTransform())&&s.setTransform(p.translate(b-c.dx,f-c.dy));this._applyStyle(a)},_createLineString:function(a){var c=this.getLayer(),b=this.createShape(c._surface,a);c.getViewport().add(b);return a.shape=b},_getLineStringShape:function(a){var c=a.shape;null==c&&(c=
this._createLineString(a),a.shape=c);return c},renderLineString:function(a){void 0==a&&(a=this._geometry);var c=this.getLayer(),b=c.getDojoMap(),f=this._getLineStringShape(a),k=this.getCoordinateSystem(),h=Array(a.coordinates.length),m=c.getViewport().getTransform();n.forEach(a.coordinates,function(a,c,f){a=b.transform(a,k);a=this._getLocalXY(a);m&&(a[0]-=m.dx,a[1]-=m.dy);h[c]={x:a[0],y:a[1]}},this);c=d.mixin({},this._defaults.lineStringShape);c=d.mixin(c,this.getShapeProperties());c=d.mixin(c,{points:h});
f.setShape(c);this._applyStyle(a)},_applyStyle:function(a){if(a&&a.shape){var c=this.getFill(),b;!c||d.isString(c)||d.isArray(c)?b=c:(b=d.mixin({},this._defaults.fill),b=d.mixin(b,c));var c=this.getStroke(),f;!c||d.isString(c)||d.isArray(c)?f=c:(f=d.mixin({},this._defaults.stroke),f=d.mixin(f,c));this._applyRecusiveStyle(a,f,b)}},_applyRecusiveStyle:function(a,c,b){var d=a.shape;d.setFill&&d.setFill(b);d.setStroke&&d.setStroke(c);a instanceof f&&n.forEach(a.coordinates,function(a){this._applyRecusiveStyle(a,
c,b)},this)},setStroke:function(a){this._stroke=a;return this},getStroke:function(){return this._stroke},setFill:function(a){this._fill=a;return this},getFill:function(){return this._fill},remove:function(){var a=this._geometry,b=a.shape;a.shape=null;b&&b.removeShape();a instanceof f&&n.forEach(a.coordinates,function(a){this.remove(a)},this)},_defaults:{fill:null,stroke:null,pointShape:{r:30},lineStringShape:null}})})},"dojox/geo/openlayers/Point":function(){define(["dojo/_base/declare","./Geometry"],
function(h,n){return h("dojox.geo.openlayers.Point",n,{setPoint:function(d){this.coordinates=d},getPoint:function(){return this.coordinates}})})},"dojox/geo/openlayers/LineString":function(){define(["dojo/_base/declare","./Geometry"],function(h,n){return h("dojox.geo.openlayers.LineString",n,{setPoints:function(d){this.coordinates=d},getPoints:function(){return this.coordinates}})})},"dojox/geo/openlayers/JsonImport":function(){define("dojo/_base/declare dojo/_base/xhr dojo/_base/lang dojo/_base/array ./LineString ./Collection ./GeometryFeature".split(" "),
function(h,n,d,p,b,a,f){return h("dojox.geo.openlayers.JsonImport",null,{constructor:function(a){this._params=a},loadData:function(){n.get({url:this._params.url,handleAs:"json",sync:!0,load:d.hitch(this,this._gotData),error:d.hitch(this,this._loadError)})},_gotData:function(b){var e=this._params.nextFeature;if(d.isFunction(e)){var c=b.layerExtent,h=c[0],g=c[1],n=h+c[2],t=g+c[3],c=b.layerExtentLL,m=c[0],v=c[1],w=v+c[3],r=m+c[2];b=b.features;for(var u in b){var c=b[u].shape,x=null;if(d.isArray(c[0])){var y=
[];p.forEach(c,function(a){a=this._makeGeometry(a,h,g,n,t,m,w,r,v);y.push(a)},this);c=new a(y);x=new f(c)}else x=this._makeFeature(c,h,g,n,t,m,w,r,v);e.call(this,x)}e=this._params.complete;d.isFunction(e)&&e.call(this,e)}},_makeGeometry:function(a,f,c,d,g,h,n,m,p){for(var w=[],r=0,u=0;u<a.length-1;u+=2){var x=a[u+1],r=(a[u]-f)/(d-f),y=r*(m-h)+h,r=(x-c)/(g-c);w.push({x:y,y:r*(p-n)+n})}return new b(w)},_makeFeature:function(a,b,c,d,g,h,n,m,p){a=this._makeGeometry(a,b,c,d,g,h,n,m,p);return new f(a)},
_loadError:function(){var a=this._params.error;d.isFunction(a)&&a.apply(this,parameters)}})})},"dojox/geo/openlayers/WidgetFeature":function(){define(["dojo/_base/declare","dojo/dom-style","dojo/_base/lang","dijit/registry","./Feature"],function(h,n,d,p,b){return h("dojox.geo.openlayers.WidgetFeature",b,{_widget:null,_bbox:null,constructor:function(a){this._params=a},setParameters:function(a){this._params=a},getParameters:function(){return this._params},_getWidget:function(){var a=this._params;if(null==
this._widget&&null!=a){var b=null;"function"==typeof a.createWidget?b=a.createWidget.call(this):a.dojoType?(dojo.require(a.dojoType),b=new (d.getObject(a.dojoType))(a)):a.dijitId?b=p.byId(a.dijitId):a.widget&&(b=a.widget);null!=b&&(this._widget=b,"function"==typeof b.startup&&b.startup(),a=b.domNode,null!=a&&n.set(a,{position:"absolute"}));this._widget=b}return this._widget},_getWidgetWidth:function(){var a=this._params;return a.width?a.width:(a=this._getWidget())?n.get(a.domNode,"width"):10},_getWidgetHeight:function(){var a=
this._params;return a.height?a.height:(a=this._getWidget())?n.get(a.domNode,"height"):10},render:function(){var a=this.getLayer(),b=this._getWidget();if(null!=b){var d=this._params,e=d.longitude,d=d.latitude,c=this.getCoordinateSystem(),e=a.getDojoMap().transformXY(e,d,c),h=this._getLocalXY(e),e=this._getWidgetWidth(),d=this._getWidgetHeight(),c=h[0]-e/2,h=h[1]-d/2,b=b.domNode,a=a.olLayer.div;b.parentNode!=a&&(b.parentNode&&b.parentNode.removeChild(b),a.appendChild(b));this._updateWidgetPosition({x:c,
y:h,width:e,height:d})}},_updateWidgetPosition:function(a){var b=this._widget;n.set(b.domNode,{position:"absolute",left:a.x+"px",top:a.y+"px",width:a.width+"px",height:a.height+"px"});b.srcNodeRef&&n.set(b.srcNodeRef,{position:"absolute",left:a.x+"px",top:a.y+"px",width:a.width+"px",height:a.height+"px"});d.isFunction(b.resize)&&b.resize({w:a.width,h:a.height})},remove:function(){var a=this._getWidget();a&&(a=a.domNode,a.parentNode&&a.parentNode.removeChild(a))}})})},"dojox/gfx/svg":function(){define("dojo/_base/lang dojo/_base/sniff dojo/_base/window dojo/dom dojo/_base/declare dojo/_base/array dojo/dom-geometry dojo/dom-attr dojo/_base/Color ./_base ./shape ./path".split(" "),
function(h,n,d,p,b,a,f,k,e,c,l,g){function q(a,b){return d.doc.createElementNS?d.doc.createElementNS(a,b):d.doc.createElement(b)}function t(a){return m.useSvgWeb?d.doc.createTextNode(a,!0):d.doc.createTextNode(a)}var m=c.svg={};m.useSvgWeb="undefined"!=typeof window.svgweb;var v=navigator.userAgent,w=n("ios"),r=n("android"),u=n("chrome")||r&&4<=r?"auto":"optimizeLegibility";m.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};m.getRef=function(a){return!a||"none"==a?null:
a.match(/^url\(#.+\)$/)?p.byId(a.slice(5,-1)):a.match(/^#dojoUnique\d+$/)?p.byId(a.slice(1)):null};m.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1,3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};var x=0;m.Shape=b("dojox.gfx.svg.Shape",l.Shape,{destroy:function(){if(this.fillStyle&&"type"in this.fillStyle){var a=this.rawNode.getAttribute("fill");(a=m.getRef(a))&&a.parentNode.removeChild(a)}if(this.clip&&
(a=this.rawNode.getAttribute("clip-path")))(a=p.byId(a.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);l.Shape.prototype.destroy.apply(this,arguments)},setFill:function(b){if(!b)return this.fillStyle=null,this.rawNode.setAttribute("fill","none"),this.rawNode.setAttribute("fill-opacity",0),this;var f,e=function(a){this.setAttribute(a,f[a].toFixed(8))};if("object"==typeof b&&"type"in b){switch(b.type){case "linear":f=c.makeParameters(c.defaultLinearGradient,b);b=this._setFillObject(f,"linearGradient");
a.forEach(["x1","y1","x2","y2"],e,b);break;case "radial":f=c.makeParameters(c.defaultRadialGradient,b);b=this._setFillObject(f,"radialGradient");a.forEach(["cx","cy","r"],e,b);break;case "pattern":f=c.makeParameters(c.defaultPattern,b),b=this._setFillObject(f,"pattern"),a.forEach(["x","y","width","height"],e,b)}this.fillStyle=f;return this}this.fillStyle=f=c.normalizeColor(b);this.rawNode.setAttribute("fill",f.toCss());this.rawNode.setAttribute("fill-opacity",f.a);this.rawNode.setAttribute("fill-rule",
"evenodd");return this},setStroke:function(a){var b=this.rawNode;if(!a)return this.strokeStyle=null,b.setAttribute("stroke","none"),b.setAttribute("stroke-opacity",0),this;if("string"==typeof a||h.isArray(a)||a instanceof e)a={color:a};a=this.strokeStyle=c.makeParameters(c.defaultStroke,a);a.color=c.normalizeColor(a.color);if(a){var f=0>a.width?0:a.width;b.setAttribute("stroke",a.color.toCss());b.setAttribute("stroke-opacity",a.color.a);b.setAttribute("stroke-width",f);b.setAttribute("stroke-linecap",
a.cap);"number"==typeof a.join?(b.setAttribute("stroke-linejoin","miter"),b.setAttribute("stroke-miterlimit",a.join)):b.setAttribute("stroke-linejoin",a.join);var d=a.style.toLowerCase();d in m.dasharray&&(d=m.dasharray[d]);if(d instanceof Array){var d=h._toArray(d),k;for(k=0;k<d.length;++k)d[k]*=f;if("butt"!=a.cap){for(k=0;k<d.length;k+=2)d[k]-=f,1>d[k]&&(d[k]=1);for(k=1;k<d.length;k+=2)d[k]+=f}d=d.join(",")}b.setAttribute("stroke-dasharray",d);b.setAttribute("dojoGfxStrokeStyle",a.style)}return this},
_getParentSurface:function(){for(var a=this.parent;a&&!(a instanceof c.Surface);a=a.parent);return a},_setFillObject:function(a,b){var f=m.xmlns.svg;this.fillStyle=a;var d=this._getParentSurface().defNode,e=this.rawNode.getAttribute("fill");if(e=m.getRef(e))if(e.tagName.toLowerCase()!=b.toLowerCase()){var k=e.id;e.parentNode.removeChild(e);e=q(f,b);e.setAttribute("id",k);d.appendChild(e)}else for(;e.childNodes.length;)e.removeChild(e.lastChild);else e=q(f,b),e.setAttribute("id",c._base._getUniqueId()),
d.appendChild(e);if("pattern"==b)e.setAttribute("patternUnits","userSpaceOnUse"),f=q(f,"image"),f.setAttribute("x",0),f.setAttribute("y",0),f.setAttribute("width",(0>a.width?0:a.width).toFixed(8)),f.setAttribute("height",(0>a.height?0:a.height).toFixed(8)),f.setAttributeNS?f.setAttributeNS(m.xmlns.xlink,"xlink:href",a.src):f.setAttribute("xlink:href",a.src),e.appendChild(f);else{e.setAttribute("gradientUnits","userSpaceOnUse");for(d=0;d<a.colors.length;++d){var k=a.colors[d],g=q(f,"stop"),h=k.color=
c.normalizeColor(k.color);g.setAttribute("offset",k.offset.toFixed(8));g.setAttribute("stop-color",h.toCss());g.setAttribute("stop-opacity",h.a);e.appendChild(g)}}this.rawNode.setAttribute("fill","url(#"+e.getAttribute("id")+")");this.rawNode.removeAttribute("fill-opacity");this.rawNode.setAttribute("fill-rule","evenodd");return e},_applyTransform:function(){if(this.matrix){var a=this.matrix;this.rawNode.setAttribute("transform","matrix("+a.xx.toFixed(8)+","+a.yx.toFixed(8)+","+a.xy.toFixed(8)+","+
a.yy.toFixed(8)+","+a.dx.toFixed(8)+","+a.dy.toFixed(8)+")")}else this.rawNode.removeAttribute("transform");return this},setRawNode:function(a){a=this.rawNode=a;"image"!=this.shape.type&&a.setAttribute("fill","none");a.setAttribute("fill-opacity",0);a.setAttribute("stroke","none");a.setAttribute("stroke-opacity",0);a.setAttribute("stroke-width",1);a.setAttribute("stroke-linecap","butt");a.setAttribute("stroke-linejoin","miter");a.setAttribute("stroke-miterlimit",4);a.__gfxObject__=this},setShape:function(a){this.shape=
c.makeParameters(this.shape,a);for(var b in this.shape)if("type"!=b){a=this.shape[b];if("width"===b||"height"===b)a=0>a?0:a;this.rawNode.setAttribute(b,a)}this.bbox=null;return this},_moveToFront:function(){this.rawNode.parentNode.appendChild(this.rawNode);return this},_moveToBack:function(){this.rawNode.parentNode.insertBefore(this.rawNode,this.rawNode.parentNode.firstChild);return this},setClip:function(a){this.inherited(arguments);var b=a?"width"in a?"rect":"cx"in a?"ellipse":"points"in a?"polyline":
"d"in a?"path":null:null;if(a&&!b)return this;"polyline"===b&&(a=h.clone(a),a.points=a.points.join(","));var c,f=k.get(this.rawNode,"clip-path");f&&(c=p.byId(f.match(/gfx_clip[\d]+/)[0]))&&c.removeChild(c.childNodes[0]);a?(c?(b=q(m.xmlns.svg,b),c.appendChild(b)):(f="gfx_clip"+ ++x,this.rawNode.setAttribute("clip-path","url(#"+f+")"),c=q(m.xmlns.svg,"clipPath"),b=q(m.xmlns.svg,b),c.appendChild(b),this.rawNode.parentNode.insertBefore(c,this.rawNode),k.set(c,"id",f)),k.set(b,a)):(this.rawNode.removeAttribute("clip-path"),
c&&c.parentNode.removeChild(c));return this},_removeClipNode:function(){var a,b=k.get(this.rawNode,"clip-path");b&&(a=p.byId(b.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);return a}});m.Group=b("dojox.gfx.svg.Group",m.Shape,{constructor:function(){l.Container._init.call(this)},setRawNode:function(a){this.rawNode=a;this.rawNode.__gfxObject__=this},destroy:function(){this.clear(!0);m.Shape.prototype.destroy.apply(this,arguments)}});m.Group.nodeType="g";m.Rect=b("dojox.gfx.svg.Rect",[m.Shape,
l.Rect],{setShape:function(a){this.shape=c.makeParameters(this.shape,a);this.bbox=null;for(var b in this.shape)if("type"!=b&&"r"!=b){a=this.shape[b];if("width"===b||"height"===b)a=0>a?0:a;this.rawNode.setAttribute(b,a)}null!=this.shape.r&&(this.rawNode.setAttribute("ry",this.shape.r),this.rawNode.setAttribute("rx",this.shape.r));return this}});m.Rect.nodeType="rect";m.Ellipse=b("dojox.gfx.svg.Ellipse",[m.Shape,l.Ellipse],{});m.Ellipse.nodeType="ellipse";m.Circle=b("dojox.gfx.svg.Circle",[m.Shape,
l.Circle],{});m.Circle.nodeType="circle";m.Line=b("dojox.gfx.svg.Line",[m.Shape,l.Line],{});m.Line.nodeType="line";m.Polyline=b("dojox.gfx.svg.Polyline",[m.Shape,l.Polyline],{setShape:function(a,b){a&&a instanceof Array?(this.shape=c.makeParameters(this.shape,{points:a}),b&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.shape=c.makeParameters(this.shape,a);this.bbox=null;this._normalizePoints();for(var f=[],e=this.shape.points,d=0;d<e.length;++d)f.push(e[d].x.toFixed(8),
e[d].y.toFixed(8));this.rawNode.setAttribute("points",f.join(" "));return this}});m.Polyline.nodeType="polyline";m.Image=b("dojox.gfx.svg.Image",[m.Shape,l.Image],{setShape:function(a){this.shape=c.makeParameters(this.shape,a);this.bbox=null;a=this.rawNode;for(var b in this.shape)if("type"!=b&&"src"!=b){var f=this.shape[b];if("width"===b||"height"===b)f=0>f?0:f;a.setAttribute(b,f)}a.setAttribute("preserveAspectRatio","none");a.setAttributeNS?a.setAttributeNS(m.xmlns.xlink,"xlink:href",this.shape.src):
a.setAttribute("xlink:href",this.shape.src);a.__gfxObject__=this;return this}});m.Image.nodeType="image";m.Text=b("dojox.gfx.svg.Text",[m.Shape,l.Text],{setShape:function(a){this.shape=c.makeParameters(this.shape,a);this.bbox=null;a=this.rawNode;var b=this.shape;a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("text-anchor",b.align);a.setAttribute("text-decoration",b.decoration);a.setAttribute("rotate",b.rotated?90:0);a.setAttribute("kerning",b.kerning?"auto":0);a.setAttribute("text-rendering",
u);a.firstChild?a.firstChild.nodeValue=b.text:a.appendChild(t(b.text));return this},getTextWidth:function(){var a=this.rawNode,b=a.parentNode,a=a.cloneNode(!0);a.style.visibility="hidden";var c=0,f=a.firstChild.nodeValue;b.appendChild(a);if(""!=f)for(;!c;)c=a.getBBox?parseInt(a.getBBox().width):68;b.removeChild(a);return c},getBoundingBox:function(){var a=null;if(this.getShape().text)try{a=this.rawNode.getBBox()}catch(b){a={x:0,y:0,width:0,height:0}}return a}});m.Text.nodeType="text";m.Path=b("dojox.gfx.svg.Path",
[m.Shape,g.Path],{_updateWithSegment:function(a){this.inherited(arguments);"string"==typeof this.shape.path&&this.rawNode.setAttribute("d",this.shape.path)},setShape:function(a){this.inherited(arguments);this.shape.path?this.rawNode.setAttribute("d",this.shape.path):this.rawNode.removeAttribute("d");return this}});m.Path.nodeType="path";m.TextPath=b("dojox.gfx.svg.TextPath",[m.Shape,g.TextPath],{_updateWithSegment:function(a){this.inherited(arguments);this._setTextPath()},setShape:function(a){this.inherited(arguments);
this._setTextPath();return this},_setTextPath:function(){if("string"==typeof this.shape.path){var a=this.rawNode;if(!a.firstChild){var b=q(m.xmlns.svg,"textPath"),f=t("");b.appendChild(f);a.appendChild(b)}b=(b=a.firstChild.getAttributeNS(m.xmlns.xlink,"href"))&&m.getRef(b);if(!b&&(f=this._getParentSurface())){var f=f.defNode,b=q(m.xmlns.svg,"path"),d=c._base._getUniqueId();b.setAttribute("id",d);f.appendChild(b);a.firstChild.setAttributeNS?a.firstChild.setAttributeNS(m.xmlns.xlink,"xlink:href","#"+
d):a.firstChild.setAttribute("xlink:href","#"+d)}b&&b.setAttribute("d",this.shape.path)}},_setText:function(){var a=this.rawNode;if(!a.firstChild){var b=q(m.xmlns.svg,"textPath"),c=t("");b.appendChild(c);a.appendChild(b)}a=a.firstChild;b=this.text;a.setAttribute("alignment-baseline","middle");switch(b.align){case "middle":a.setAttribute("text-anchor","middle");a.setAttribute("startOffset","50%");break;case "end":a.setAttribute("text-anchor","end");a.setAttribute("startOffset","100%");break;default:a.setAttribute("text-anchor",
"start"),a.setAttribute("startOffset","0%")}a.setAttribute("baseline-shift","0.5ex");a.setAttribute("text-decoration",b.decoration);a.setAttribute("rotate",b.rotated?90:0);a.setAttribute("kerning",b.kerning?"auto":0);a.firstChild.data=b.text}});m.TextPath.nodeType="text";var y=534<function(){var a=/WebKit\/(\d*)/.exec(v);return a?a[1]:0}();m.Surface=b("dojox.gfx.svg.Surface",l.Surface,{constructor:function(){l.Container._init.call(this)},destroy:function(){l.Container.clear.call(this,!0);this.defNode=
null;this.inherited(arguments)},setDimensions:function(a,b){if(!this.rawNode)return this;var c=0>a?0:a,f=0>b?0:b;this.rawNode.setAttribute("width",c);this.rawNode.setAttribute("height",f);y&&(this.rawNode.style.width=c,this.rawNode.style.height=f);return this},getDimensions:function(){return this.rawNode?{width:c.normalizedLength(this.rawNode.getAttribute("width")),height:c.normalizedLength(this.rawNode.getAttribute("height"))}:null}});m.createSurface=function(a,b,f){var d=new m.Surface;d.rawNode=
q(m.xmlns.svg,"svg");d.rawNode.setAttribute("overflow","hidden");b&&d.rawNode.setAttribute("width",0>b?0:b);f&&d.rawNode.setAttribute("height",0>f?0:f);b=q(m.xmlns.svg,"defs");d.rawNode.appendChild(b);d.defNode=b;d._parent=p.byId(a);d._parent.appendChild(d.rawNode);c._base._fixMsTouchAction(d);return d};n={_setFont:function(){var a=this.fontStyle;this.rawNode.setAttribute("font-style",a.style);this.rawNode.setAttribute("font-variant",a.variant);this.rawNode.setAttribute("font-weight",a.weight);this.rawNode.setAttribute("font-size",
a.size);this.rawNode.setAttribute("font-family",a.family)}};var z=l.Container;b=m.Container={openBatch:function(){if(!this._batch){var a;a=m.useSvgWeb?d.doc.createDocumentFragment(!0):d.doc.createDocumentFragment();this.fragment=a}++this._batch;return this},closeBatch:function(){this._batch=0<this._batch?--this._batch:0;this.fragment&&!this._batch&&(this.rawNode.appendChild(this.fragment),delete this.fragment);return this},add:function(a){this!=a.getParent()&&(this.fragment?this.fragment.appendChild(a.rawNode):
this.rawNode.appendChild(a.rawNode),z.add.apply(this,arguments),a.setClip(a.clip));return this},remove:function(a,b){this==a.getParent()&&(this.rawNode==a.rawNode.parentNode&&this.rawNode.removeChild(a.rawNode),this.fragment&&this.fragment==a.rawNode.parentNode&&this.fragment.removeChild(a.rawNode),a._removeClipNode(),z.remove.apply(this,arguments));return this},clear:function(){for(var a=this.rawNode;a.lastChild;)a.removeChild(a.lastChild);var b=this.defNode;if(b){for(;b.lastChild;)b.removeChild(b.lastChild);
a.appendChild(b)}return z.clear.apply(this,arguments)},getBoundingBox:z.getBoundingBox,_moveChildToFront:z._moveChildToFront,_moveChildToBack:z._moveChildToBack};g=m.Creator={createObject:function(a,b){if(!this.rawNode)return null;var c=new a,f=q(m.xmlns.svg,a.nodeType);c.setRawNode(f);c.setShape(b);this.add(c);return c}};h.extend(m.Text,n);h.extend(m.TextPath,n);h.extend(m.Group,b);h.extend(m.Group,l.Creator);h.extend(m.Group,g);h.extend(m.Surface,b);h.extend(m.Surface,l.Creator);h.extend(m.Surface,
g);m.fixTarget=function(a,b){a.gfxTarget||(a.gfxTarget=w&&a.target.wholeText?a.target.parentElement.__gfxObject__:a.target.__gfxObject__);return!0};m.useSvgWeb&&(m.createSurface=function(a,b,d){var e=new m.Surface;b=0>b?0:b;d=0>d?0:d;if(!b||!d){var k=f.position(a);b=b||k.w;d=d||k.h}a=p.byId(a);var k=a.id?a.id+"_svgweb":c._base._getUniqueId(),g=q(m.xmlns.svg,"svg");g.id=k;g.setAttribute("width",b);g.setAttribute("height",d);svgweb.appendChild(g,a);g.addEventListener("SVGLoad",function(){e.rawNode=
this;e.isLoaded=!0;var a=q(m.xmlns.svg,"defs");e.rawNode.appendChild(a);e.defNode=a;if(e.onLoad)e.onLoad(e)},!1);e.isLoaded=!1;return e},m.Surface.extend({destroy:function(){var a=this.rawNode;svgweb.removeChild(a,a.parentNode)}}),n={connect:function(a,b,c){"on"===a.substring(0,2)&&(a=a.substring(2));c=2==arguments.length?b:h.hitch(b,c);this.getEventSource().addEventListener(a,c,!1);return[this,a,c]},disconnect:function(a){this.getEventSource().removeEventListener(a[1],a[2],!1);delete a[0]}},h.extend(m.Shape,
n),h.extend(m.Surface,n));return m})},"dojox/gfx/path":function(){define(["./_base","dojo/_base/lang","dojo/_base/declare","./matrix","./shape"],function(h,n,d,p,b){b=d("dojox.gfx.path.Path",b.Shape,{constructor:function(a){this.shape=n.clone(h.defaultPath);this.segments=[];this.tbbox=null;this.absolute=!0;this.last={};this.rawNode=a;this.segmented=!1},setAbsoluteMode:function(a){this._confirmSegmented();this.absolute="string"==typeof a?"absolute"==a:a;return this},getAbsoluteMode:function(){this._confirmSegmented();
return this.absolute},getBoundingBox:function(){this._confirmSegmented();return this.bbox&&"l"in this.bbox?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null},_getRealBBox:function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;var a=this.bbox,b=this._getRealMatrix();this.bbox=null;for(var d=0,e=this.segments.length;d<e;++d)this._updateWithSegment(this.segments[d],b);b=this.bbox;this.bbox=a;return this.tbbox=b?[{x:b.l,y:b.t},{x:b.r,y:b.t},{x:b.r,
y:b.b},{x:b.l,y:b.b}]:null},getLastPosition:function(){this._confirmSegmented();return"x"in this.last?this.last:null},_applyTransform:function(){this.tbbox=null;return this.inherited(arguments)},_updateBBox:function(a,b,d){d&&(b=p.multiplyPoint(d,a,b),a=b.x,b=b.y);this.bbox&&"l"in this.bbox?(this.bbox.l>a&&(this.bbox.l=a),this.bbox.r<a&&(this.bbox.r=a),this.bbox.t>b&&(this.bbox.t=b),this.bbox.b<b&&(this.bbox.b=b)):this.bbox={l:a,b:b,r:a,t:b}},_updateWithSegment:function(a,b){var d=a.args,e=d.length,
c;switch(a.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(c=0;c<e;c+=2)this._updateBBox(d[c],d[c+1],b);this.last.x=d[e-2];this.last.y=d[e-1];this.absolute=!0;break;case "H":for(c=0;c<e;++c)this._updateBBox(d[c],this.last.y,b);this.last.x=d[e-1];this.absolute=!0;break;case "V":for(c=0;c<e;++c)this._updateBBox(this.last.x,d[c],b);this.last.y=d[e-1];this.absolute=!0;break;case "m":c=0;"x"in this.last||(this._updateBBox(this.last.x=d[0],this.last.y=d[1],b),c=2);for(;c<e;c+=2)this._updateBBox(this.last.x+=
d[c],this.last.y+=d[c+1],b);this.absolute=!1;break;case "l":case "t":for(c=0;c<e;c+=2)this._updateBBox(this.last.x+=d[c],this.last.y+=d[c+1],b);this.absolute=!1;break;case "h":for(c=0;c<e;++c)this._updateBBox(this.last.x+=d[c],this.last.y,b);this.absolute=!1;break;case "v":for(c=0;c<e;++c)this._updateBBox(this.last.x,this.last.y+=d[c],b);this.absolute=!1;break;case "c":for(c=0;c<e;c+=6)this._updateBBox(this.last.x+d[c],this.last.y+d[c+1],b),this._updateBBox(this.last.x+d[c+2],this.last.y+d[c+3],b),
this._updateBBox(this.last.x+=d[c+4],this.last.y+=d[c+5],b);this.absolute=!1;break;case "s":case "q":for(c=0;c<e;c+=4)this._updateBBox(this.last.x+d[c],this.last.y+d[c+1],b),this._updateBBox(this.last.x+=d[c+2],this.last.y+=d[c+3],b);this.absolute=!1;break;case "A":for(c=0;c<e;c+=7)this._updateBBox(d[c+5],d[c+6],b);this.last.x=d[e-2];this.last.y=d[e-1];this.absolute=!0;break;case "a":for(c=0;c<e;c+=7)this._updateBBox(this.last.x+=d[c+5],this.last.y+=d[c+6],b);this.absolute=!1}var l=[a.action];for(c=
0;c<e;++c)l.push(h.formatNumber(d[c],!0));if("string"==typeof this.shape.path)this.shape.path+=l.join("");else{c=0;for(e=l.length;c<e;++c)this.shape.path.push(l[c])}},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},_pushSegment:function(a,b){this.tbbox=null;var d=this._validSegments[a.toLowerCase()];"number"==typeof d&&(d?b.length>=d&&(d={action:a,args:b.slice(0,b.length-b.length%d)},this.segments.push(d),this._updateWithSegment(d)):(d={action:a,args:[]},this.segments.push(d),this._updateWithSegment(d)))},
_collectArgs:function(a,b){for(var d=0;d<b.length;++d){var e=b[d];"boolean"==typeof e?a.push(e?1:0):"number"==typeof e?a.push(e):e instanceof Array?this._collectArgs(a,e):"x"in e&&"y"in e&&a.push(e.x,e.y)}},moveTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"M":"m",a);return this},lineTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"L":"l",a);return this},hLineTo:function(){this._confirmSegmented();
var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"H":"h",a);return this},vLineTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"V":"v",a);return this},curveTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"C":"c",a);return this},smoothCurveTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"S":
"s",a);return this},qCurveTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"Q":"q",a);return this},qSmoothCurveTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"T":"t",a);return this},arcTo:function(){this._confirmSegmented();var a=[];this._collectArgs(a,arguments);this._pushSegment(this.absolute?"A":"a",a);return this},closePath:function(){this._confirmSegmented();this._pushSegment("Z",
[]);return this},_confirmSegmented:function(){if(!this.segmented){var a=this.shape.path;this.shape.path=[];this._setPath(a);this.shape.path=this.shape.path.join("");this.segmented=!0}},_setPath:function(a){a=n.isArray(a)?a:a.match(h.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(a){for(var b="",d=[],e=a.length,c=0;c<e;++c){var l=a[c],g=parseFloat(l);isNaN(g)?(b&&this._pushSegment(b,d),d=[],b=l):d.push(g)}this._pushSegment(b,d)}},setShape:function(a){this.inherited(arguments,
["string"==typeof a?{path:a}:a]);this.segmented=!1;this.segments=[];h.lazyPathSegmentation||this._confirmSegmented();return this},_2PI:2*Math.PI});d=d("dojox.gfx.path.TextPath",b,{constructor:function(a){"text"in this||(this.text=n.clone(h.defaultTextPath));"fontStyle"in this||(this.fontStyle=n.clone(h.defaultFont))},getText:function(){return this.text},setText:function(a){this.text=h.makeParameters(this.text,"string"==typeof a?{text:a}:a);this._setText();return this},getFont:function(){return this.fontStyle},
setFont:function(a){this.fontStyle="string"==typeof a?h.splitFontString(a):h.makeParameters(h.defaultFont,a);this._setFont();return this}});return h.path={Path:b,TextPath:d}})}}});define("dojo/pmbmaps",[],1);
//# sourceMappingURL=pmbmaps.js.map