I’m trying to compress the thinkgeo .axd files, and i’m using the suggestion i found here:
thinkgeo.com/forums/MapSuite/tabid/143/aft/10866/Default.aspx
ok, that’s easy, i add the line
Map1.IsDefaultJavascriptLibraryDisabled = true;
in my code, and my map page won’t load at all with that change. In my chrome console, i’m getting the following error:
mapParser is not defined
in this long script of yours:
varrootPath =‘…/…/…/’;varjsoncMap1={“resolutions”:[156542.64237009812,78271.321198278223,39135.660585909951,19567.830298246638,9783.9151491233188,4891.9575732387439,2445.9787871485382,1222.9893937065608,611.4946968532804,305.74734829434857,152.87367420009093,76.436837113274635,38.218418556637317,19.109209275672825,9.5546046365134956,4.7773023182567478,2.3886511593929574,1.1943255795641869,0.59716278978209347,0.29858139489104674],“maxExtent”:{“left”:-1000000000,“bottom”:-1000000000,“right”:1003745822.33726,“top”:1003745822.33726},“currentExtent”:{“left”:-13632444.9961943,“bottom”:3383583.04260912,“right”:-9870442.48466808,“top”:5464044.04143854},“cursor”:“default”,“units”:“Meter”,“baselayerid”:“GoogleMap”,“markerOverlay”:{“gridSize”:0,“isBaseLayer”:false,“otype”:“MARKERS”,“isDefault”:false,“visibility”:true,“name”:“DefaultMarkerOverlay”,“opacity”:1,“displayInLayerSwitcher”:false,“Id”:“DefaultMarkerOverlay”,“AutoRefreshMilliseconds”:0},“layers”:[{“traf”:false,“centerOnStreetView”:false,“type”:"(typeof G_HYBRID_MAP!==‘undefined’)?G_HYBRID_MAP:google.maps.MapTypeId.HYBRID",“otype”:“Google”,“tick”:"",“visibility”:true,“name”:“Google Map”,“opacity”:1,“displayInLayerSwitcher”:true,“isBaseLayer”:true,“Id”:“GoogleMap”,“AutoRefreshMilliseconds”:0},{“parameters”:{“LAYERS”:“GoogleLayer”,“STYLES”:“WorldMapKitDefaultStyle”,“CLIENTMODE”:“Web”,“SRS”:“EPSG:900913”},“transitionEffect”:“resize”,“singleTile”:“0”,“w”:256,“h”:256,“format”:“image/jpeg”,“otype”:“WMK”,“uris”:["<a href=“worldmapkit1.thinkgeo.com/CachedWmsServer/WmsServer.axd">worldmapkit1.thinkgeo.com/Ca...Server.axd</a>",”<a href=“worldmapkit2.thinkgeo.com/CachedWmsServer/WmsServer.axd">worldmapkit2.thinkgeo.com/Ca...Server.axd</a>",”<a href=“worldmapkit3.thinkgeo.com/CachedWmsServer/WmsServer.axd">worldmapkit3.thinkgeo.com/Ca...Server.axd</a>",”<a href=“worldmapkit4.thinkgeo.com/CachedWmsServer/WmsServer.axd">worldmapkit4.thinkgeo.com/Ca...Server.axd</a>"],“wrapDateLine”:“0”,“tick”:”",“visibility”:true,“name”:“WorldMapKit”,“opacity”:1,“displayInLayerSwitcher”:true,“isBaseLayer”:true,“Id”:“WorldMapKit”,“AutoRefreshMilliseconds”:0},{“w”:256,“h”:256,“transitionEffect”:“resize”,“singleTile”:“1”,“buffer”:0,“clientCache”:{“cacheId”:""},“imageFormat”:“image/png”,“jpegQuality”:100,“singleThread”:false,“visibility”:true,“otype”:“LAYER”,“extra”:“28093503353”,“projection”:“EPSG:4326”,“wrapDateLine”:“0”,“name”:“IncidentOverlay”,“opacity”:1,“displayInLayerSwitcher”:true,“isBaseLayer”:false,“Id”:“IncidentOverlay”,“AutoRefreshMilliseconds”:0}],“rootPath”:"…/…/…/",“editOverlay”:
{“mode”:“None”,“editSettings”:{“drag”:true,“reshape”:true,“resize”:false,“rotate”:true},“features”:[],“style”:{“fillColor”:"#0033FF",“fillOpacity”:0.31372549019607843,“strokeColor”:"#0033FF",“strokeOpacity”:0.62745098039215685,“strokeWidth”:1},“otype”:“VECTOR”,“visibility”:true,“name”:“EditOverlay”,“opacity”:1,“displayInLayerSwitcher”:false,“isBaseLayer”:false,“Id”:“EditOverlay”,“AutoRefreshMilliseconds”:0},“highlightOverlay”:{“highlightStyle”:{“fillColor”:"#FF3300",“fillOpacity”:0.31372549019607843,“strokeColor”:"#FF3300",“strokeOpacity”:0.62745098039215685,“strokeWidth”:1},“features”:[],“style”:{“fillColor”:"#0033FF",“fillOpacity”:0.31372549019607843,“strokeColor”:"#0033FF",“strokeOpacity”:0.62745098039215685,“strokeWidth”:1},“otype”:“VECTOR”,“visibility”:true,“name”:“HighlightOverlay”,“opacity”:1,“displayInLayerSwitcher”:false,“isBaseLayer”:false,“Id”:“HighlightOverlay”,“AutoRefreshMilliseconds”:0},“controls”:{“Measure”:{“measureType”:“PathMeasure”,“displaySystem”:“metric”,“geodesic”:false,“enabled”:false},“TouchNavigation”:{“enabled”:true},“AnimationPan”:{“delay”:300,“onClientClick”:"",“enabled”:false},“LayerSwitcher”:{“onLayerChanged”:"",“roundedCornerColor”:"#DDDDDD",“activeColor”:"#DDDDDD",“baseTitle”:"",“switchTitle”:"",“enabled”:false},“Navigation”:{“wheelDisabled”:false,“zoomBoxKeyMask”:“1”,“enabled”:true},“MousePosition”:{“showType”:“latlon”,“enabled”:true},“OverviewMap”:{“maxRatio”:24,“minRatio”:8,“enabled”:false},“PanZoom”:{“zoomWorldIcon”:true,“enabled”:false},“PanZoomBar”:{“zoomWorldIcon”:true,“enabled”:true},“ScaleLine”:{“enabled”:true},“Logo”:{“enabled”:false},“KeyboardDefaults”:{“slideFactor”:75,“enabled”:false},“LoadingImage”:{“w”:0,“h”:0,“enabled”:false}},“onClientClick”:“mapClick”,“trackShapeEnd”:“trackShapeFinished”,“popups”:[{“html”:"",“popupType”:“CloudPopup”,“id”:“IncidentInfo”,“lonlat”:{“x”:0,“y”:0},“w”:450,“h”:300,“visibility”:false,“opacity”:1,“autosize”:false,“autopan”:false,“closable”:true,“ox”:0,“oy”:0}],“pageName”:“PouaTxafm0iEmMzmzRTHyA_cMap1”,“centerX”:-11751443.7404312,“centerY”:4423813.54202383,“zoom”:-1,“cid”:“cMap1”,“uid”:“Map1”};parsercMap1=newmapParser(jsoncMap1);Map1=parsercMap1.map;CreateAllMaps();keepsession(rootPath);vartg=newThinkGeo(‘cMap1’);Class.Extent(Map1,tg);initMapSize(parsercMap1.map,rootPath,‘PouaTxafm0iEmMzmzRTHyA_cMap1’);//]]>
if i leave the IsDefaultJavascriptLibraryDisabled line in the C# code and set it to false, it works fine again. Is this functionality no longer supported? Or is there another setting i need to be messing with
to get it to work right? I am using MVCEdition.dll version 8.0.0.106