Leaflet - draggable marker with popup from geojson data - leaflet
I am trying for hours now to find out how to implement GeoJson data into a draggable marker in leaflet.
What should be the outcome?
I have a lot of GeoJson data and when the user moves the marker around it should always be updated with the data in a popup from the GeoJson data.
However, I do not get any popup and this popup should be shown automatically when the user moves the marker around as well as when the user opens the map.
For now I was able to do this thing: Marker, LineString but there opens no popup when I move the marker around, there will be only a popup when the mouse clicks on a point of the Linstring.
Maybe someone can help me, please!
Thank you very much in advance!
Here is my code:
var lat = "48.213596251439945";
var lon = "16.370388632910814";
var userLocation = new L.LatLng(lat, lon);
var map = L.map('map').setView(userLocation, 15);
var marker = new L.Marker(userLocation, {draggable:true}).addTo(map);
function onEachFeature(feature, layer) {
if (feature.properties && feature.properties.ADRESSE) {
layer.bindPopup(feature.properties.ADRESSE);
}
}
var park ={"type":"FeatureCollection","totalFeatures":318,"features":[{"type":"Feature","id":"PARKENANRAINEROGD.46915","geometry":{"type":"LineString","coordinates":[[16.343426519543712,48.19899297608236],[16.343819453861414,48.199054476000356]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46915,"ADRESSE":"7, Lindengasse 65","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 7. Bezirk","STELLPL_ANZ":6,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46916","geometry":{"type":"LineString","coordinates":[[16.344127698086258,48.19693994597798],[16.34405731788839,48.197075926878945]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46916,"ADRESSE":"7, Schottenfeldgasse 1","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 7. Bezirk","STELLPL_ANZ":5,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46917","geometry":{"type":"LineString","coordinates":[[16.343436482402232,48.19823247289745],[16.343044047309462,48.19816957993468]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46917,"ADRESSE":"7, Apollogasse 5","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 7. Bezirk","STELLPL_ANZ":6,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46918","geometry":{"type":"LineString","coordinates":[[16.341316763422924,48.197389549581146],[16.341216883353184,48.19783422369746]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46918,"ADRESSE":"7, Kaiserstraße 7 bis 9","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 7. Bezirk","STELLPL_ANZ":10,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46919","geometry":{"type":"LineString","coordinates":[[16.340597502665545,48.19814779191206],[16.340710677525596,48.197984617136626]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46919,"ADRESSE":"7, Apollogasse 28","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 7. Bezirk","STELLPL_ANZ":4,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46920","geometry":{"type":"LineString","coordinates":[[16.36369899496353,48.21041785473858],[16.364024360352,48.20999372090455]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46920,"ADRESSE":"1, Petrarcagasse 2","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 1. Bezirk","STELLPL_ANZ":11,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46921","geometry":{"type":"LineString","coordinates":[[16.370388632910814,48.213596251439945],[16.371272095721892,48.213365313905804]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46921,"ADRESSE":"1, Salzgries 14 bis 18","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 1. Bezirk","STELLPL_ANZ":22,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46922","geometry":{"type":"LineString","coordinates":[[16.34089103293889,48.19102192022651],[16.340805285726734,48.19119392107657]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46922,"ADRESSE":"6, Gfrornergasse 11","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 6. Bezirk","STELLPL_ANZ":4,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46923","geometry":{"type":"LineString","coordinates":[[16.37738967522273,48.2028433999537],[16.37697583375718,48.20243859721643]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46923,"ADRESSE":"1, Kantgasse 2 bis 4","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 1. Bezirk","STELLPL_ANZ":11,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46924","geometry":{"type":"LineString","coordinates":[[16.375161348679857,48.203392872925484],[16.375490802610553,48.20370480701764]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46924,"ADRESSE":"1, Hegelgasse 10 bis 12","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 1. Bezirk","STELLPL_ANZ":12,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46925","geometry":{"type":"LineString","coordinates":[[16.37563338574046,48.20383069631851],[16.37609805265778,48.204271916358685]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46925,"ADRESSE":"1, Hegelgasse 6 bis 8","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 1. Bezirk","STELLPL_ANZ":10,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}},{"type":"Feature","id":"PARKENANRAINEROGD.46926","geometry":{"type":"LineString","coordinates":[[16.375482015391142,48.20375222547123],[16.37494494209173,48.20399285355658]]},"geometry_name":"SHAPE","properties":{"OBJECTID":46926,"ADRESSE":"1, Johannesgasse 14","AUSNAHME_TXT":"ausg. Fahrzeuge mit Parkkleber für den 1. Bezirk","STELLPL_ANZ":10,"WEITERE_INF":"http://www.wien.gv.at/verkehr/parken/kurzparkzonen/anrainerparken/index.html","SE_ANNO_CAD_DATA":null}}]};
L.geoJson(park, {
onEachFeature: onEachFeature
}).addTo(map);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 20}).addTo(map);
var lat = "48.213596251439945";
var lon = "16.370388632910814";
Latitude & longitude are numbers: these should not have quotes around them. Quotes mean strings.
Besides that, it's not clear what you're really trying to do... you drag around a marker and whatever the marker is on top of, that's what the popup of the marker shows? Since the marker can be on top of multiple features at the same time, should it show all? None? And can it be dragged on top of a point, which has zero area?
Related
select multiple checkboses in matlab
I have a gui with nine checkbox in the following code i can select only one of each but what i wanted to add is if the NormeEm checkbox is selected i want to select another checkbox, which i tried to set up at the end of the code by using a switch and 2 cases so that only another one checkbox can be selected but it won't show and it doesn't give me an error code. function kgexec4n(Init) %KGEXEC4N boite de dialogue "norme" associée à kgexec4 %CAVIAR2, © ALSTOM + OL 2000/04-2003/03 error(nargchk(0,1,nargin)); persistent blkParamNorm %%%% ouverture boite if nargin==1 %"full block path name" du bloc ParamNorme blkParamNorm=gcb; if ~strcmp(get_param(blkParamNorm,'MaskType'),'ParamNor') errordlg(kverranorm(14),'Caviar3','modal') return end %création figure hf=kgui4n; %en cas de librairie verrouillée on interdit OK %x=get_param(get_param(gcs,'Parent'),'Lock'); %modif2.4 10/03/2006 rep=findstr(gcs,'/'); if isempty(rep) active_sys=gcs; else active_sys=gcs(1:rep-1) end x=get_param(active_sys,'Lock') set( findobj(hf,'Tag','NormeOK'), 'Enable', onoff(~onoff(x)) ) else hf=gcbf; end %%%% handles des contrôles et dévalidation de tout hrb=[findobj(hf,'Tag','Norme0') findobj(hf,'Tag','Norme1022') findobj(hf,'Tag','NormeEm') findobj(hf,'Tag','NormeG53') findobj(hf,'Tag','NormeCh') findobj(hf,'Tag','NormeUsrV') findobj(hf,'Tag','NormeUsrI') findobj(hf,'Tag','Norme50160') findobj(hf,'Tag','Norme519')]; hrbVal=get(hrb,'Value'); set(hrb,'Value',0) hno=[findobj(hf,'Tag','Param0') findobj(hf,'Tag','Param1022') findobj(hf,'Tag','ParamEm') findobj(hf,'Tag','ParamG53') findobj(hf,'Tag','ParamCh') findobj(hf,'Tag','ParamUsrV') findobj(hf,'Tag','ParamUsrI') findobj(hf,'Tag','Param50160') findobj(hf,'Tag','Param519-1') findobj(hf,'Tag','Param519-2') findobj(hf,'Tag','Param519-3') findobj(hf,'Tag','Param519-4')]; set(hno,'Enable','off') %%%% gestion dynamique de la boite switch get(gcbo,'Tag'); %l'objet ayant provoqué l'appel %dialogue dynamique case {'Norme0','Norme1022'} set(gcbo,'Value',1) case 'NormeEm' set(gcbo,'Value',1),enable(hno(3)) switch get(gcbo,'Tag'); case 'Norme1022' set(findobj(hf,'Tag','Norme1022'),'Value',1) case 'NormeUsrV' set(findobj(hf,'Tag','NormeUsrV'),'Value',1),enable(hno(6)) end case 'NormeG53' set(gcbo,'Value',1),enable(hno(4)) case 'NormeCh' set(gcbo,'Value',1),enable(hno(5)) case 'NormeUsrV' set(gcbo,'Value',1),enable(hno(6)) case 'NormeUsrI' set(gcbo,'Value',1),enable(hno(7)) case 'Norme50160' set(gcbo,'Value',1),enable(hno(8)) case {'Norme519','Param519-1'} set(hrb(9),'Value',1),Scr519(hno(9:12)) end If i could have some help to figure out what's wrong in my code it would help me a lot
MATLAB sorting data and creating matrix by year
I have the following data sample: 2001 1 2000 1 1974 1 2007 1 2007 2 2007 6 2007 3 1994 1 1986 1 2007 1 I want to sort the data by year and then plot the values. I wrote a code using for and find. However, using fprintf I got only the output in the command window, like this: Ano-modelo 2009 | 88242 veiculos Ano-modelo 2010 | 125822 veiculos Ano-modelo 2011 | 132360 veiculos Ano-modelo 2012 | 167984 veiculos So, Is there some alternative way that, inside for loop, to create a matrix c = [year; sum_vehicles]? My code is the following: dados = dlmread('c:\experimental\frota_detran\frota-detran_total.dat'); ano = 1922:2015; for i = ano %procura somente os valores a cada ano pro = find(dados(:,1)==i); %lista somente os valores qt = dados(pro,:); %soma o ano modelo em questao total = sum (qt(:,2)); %exibe os valores para cada ano modelo fprintf('%s %d %s %d %s \n','Ano-modelo',i ,'|',total, 'veiculos'); end
Looks like you want the data sorted and aggregated: [sorted ia ic] = unique(dados(:,1)); c = [sorted accumarray(ic, dados(:,2))];
PdfReaderContentParser.ProcessContent returns whitespace for clear text
I'd like to parse a pdf for texts containing both, binary and clear text data. When I try to do it with PdfReaderContentParser the GetResultantText method returns the right texts for the binary content but whitespaces for the clear text content. Here is the code I use: byte[] binaryPdf = File.ReadAllBytes(this.fileName); reader = new PdfReader(binaryPdf); PdfReaderContentParser parser = new PdfReaderContentParser(reader); for (int i = 1; i <= reader.NumberOfPages; i++) { SimpleTextExtractionStrategy simpleStragety = parser.ProcessContent(i, new SimpleTextExtractionStrategy()); string contentText = simpleStragety.GetResultantText(); // Do something with the contentText // ... } Any idea how to get all content?
Overview In a comment the OP clarified which texts he was missing in his extracted text: Basically for all descriptions on the left-hand side (e.g. Lifting moment) I get whitespaces instead of the actual text. The reason for this is fairly simple: In the page content there are only spaces (if anything at all) on most of the left side. The labels you see actually are read-only form fields. For example the "Lifting moment" is the value of the form field 13B141032. If you want text extraction to include these fields, too, you should consider flattening the document in a first step (moving the field appearances into the regular page content stream) and extracting text from this flattened document. Document analysis It looks like the major part of the internationalization of the specification labels has been done using form fields. For an overview I separated the original document into its regular page content and the form fields There indeed are several strings of spaces in the page content under the form fields. I would assume that there once was an earlier version of that document (or a template for it) which contained those labels (maybe in only one language or probably two) as page content. Then there was a task of more dynamic internationalization, so someone replaced the existing labels in the page content by spaces and added new internationalized labels as read-only form-fields, probably because form fields are easier to manipulate. Considering that the original labels seem to have been replaced by an equal number of spaces, though, one might speculate that there even is another program manipulating the page stream of this and similar documents at hard coded offsets, and to not break this program in the course of internationalization the actual labels had to be created outside the page content. Stranger things have happened... Flatten and extract As mentioned above, if you want text extraction to include these fields, too, you should consider flattening the document in a first step (moving the field appearances into the regular page content stream) and extracting text from this flattened document. This can be done like this: [Test] public void ExtractFlattenedTextTestSeeb() { FileInfo file = new FileInfo(#"PATH_TO_FILE\41851208.pdf"); Console.Out.Write("41851208.pdf, flattened before extraction\n\n"); using (MemoryStream memStream = new MemoryStream()) { using (PdfReader readerOrig = new PdfReader(file.FullName)) using (PdfStamper stamper = new PdfStamper(readerOrig, memStream)) { stamper.Writer.CloseStream = false; stamper.FormFlattening = true; } memStream.Position = 0; using (PdfReader readerFlat = new PdfReader(memStream)) { PdfReaderContentParser parser = new PdfReaderContentParser(readerFlat); for (int i = 1; i <= readerFlat.NumberOfPages; i++) { SimpleTextExtractionStrategy simpleStragety = parser.ProcessContent(i, new SimpleTextExtractionStrategy()); string contentText = simpleStragety.GetResultantText(); Console.Write("Page {0}:\n\n{1}\n\n", i, contentText); } } } } The result StandardOutput: 41851208.pdf, flattened before extraction Page 1: 90–120 l/min (23.8–31.7 US gal./min) 60 kg (132 lbs) 115 kg (254 lbs) 350 l (92.5 US gal.) 100 kg 105 kg (220 lbs) (231 kg) 100 kg (220 lbs) 250 l 300 l (66.0 US gal.) (79.3 US gal.) 90 kg (198 lbs) 180 l (47.6 US gal.) 5305kg (11695 lbs) 5265kg (11607 lbs) 5395kg (11894 lbs) 5205kg (11475 lbs) 5010kg (11045 lbs) 4780kg (10538 lbs) 4470kg (9854 lbs) 4190kg (9237 lbs) 3930kg (8664 lbs) 5215kg (11497 lbs) 5045kg (11122 lbs) 4860kg (10714 lbs) 4650kg (10251 lbs) 4350kg (9590 lbs) 4100kg (9039 lbs) 3850kg (8488 lbs) 25.2 m (82’ 8") 23.2 m (76’ 1") 21.0 m (68’ 11") 18.7 m (61’ 4") 16.4 m (53’ 10") 14.1 m (46’ 3") 11.8 m (38’ 9") 9.7 m (31’ 10") 7.7 m (25’ 3") 36.5 MPa (365 bar) (5293 psi) endlos endless sans finite 25.2 m 31.2 m (82’ 8") (102’ 4") 21.0 m (68’ 11") 14900kg (32848 lbs) 403.2 kNm (41.1 mt) (297270 ft.lbs) 49.1 kNm (5.0 mt) PK 42002–SH A–G (36210 ft.lbs) 37.3 kNm (3.8 mt) PK 42002–SH A–C (27510 ft.lbs) 1GETR 2GETR PK 42002–SH A – C KT250 KT300 KT350 KT180 2GETR STZY +V1 +V2 +2/4 7(F) 8(G) 6(E) 5(D) 4(C) 3(B) 2(A) +V1 +V2 (S410–SK–D) DTS410SHC/03 0100 11/2010 PK 42002–SH Type Model Modell Page Page Seite Chapitre Chapter Kapitel Edition Edition Ausgabe Öltank Mehrgewicht: Alle Gewichtsangaben ohne Aufbauzubehör,Zusatzgeräte und Öl. Hydr. Ausschübe: Max. Reichweite + Fly-Jib: Max. Reichweite: Fördermenge der Pumpe: Betriebsdruck: Schwenkmoment: Schwenkbereich: Max. Reichweite: Max. hydraulische Reichweite: Max. Hubkraft: Max. Hubmoment: Gewicht +V ohne 2/4 Krangewicht (R3X,STZS): Technische Daten Konstruktionsänderungen vorbehalten, fertigungstechn. Toleranzen müssen berücksichtigt werden. Oil tank Excess weight: All weights given without assembly accessory,additional devices and oil. Hydr. boom extensions: Max. outreach + Fly-Jib: Max. outreach: Pump capacity: Operating pressure: Slewing torque: Slewing angle: Max. outreach: Max. hydraulic outreach: Max. lifting capacity: Lifting moment: Weight +V without 2/4 Crane weight (R3X,STZS): Specifications Subject to change, production tolerances have to be taken into account. Réservoir Excessif poids: Tous les poids sans huile ni accessoire de montage ni appareils accessoires Extensions hydrauliques: Portee maximale + Fly-Jib: Max. portee: Debit de pompe: Pression d' utilisation: Couple de rotation: Angle de rotation: Max. portee: Portee hydraulique maximale: Capacite maxi de levage: Couple de levage: Poids +V sans 2/4 Poids grue (R3X,STZS): Données Techniques Sous reserve de modifications de conception. Les tolerances relatives a la technique de production doivent etre prises en consideration. As you see, "Lifting moment" and all the other missing labels are there now.
Set width of HTML in UIWebView
Can I programmatically set the width of the HTML file i throw into the UIWebView ? My problem is that the UIWebView frame ist set in a TableView cell, so I had to set CGRectMake to fit it in the Cell. But now the size of the content is bigger than the frame... Can I set the width in the UIWebView for the HTML ? This is the HTML Code: <div id="attachment_16505" class="wp-caption alignnone" style="width: 460px"><img src="http://www.floorballmagazin.de/wp-content/uploads/2013/03/20130303_schweiz.jpg" alt="Maßgeblich beteiligt - Mathias Hofbauer sprang von der Strafbank und netzte zum 3:1 ein. / Foto: Hans Ulrich Muelchi, Swiss Unihockey" width="460" height="318" class="size-full wp-image-16505 colorbox-16504" /> <p class="wp-caption-text">Maßgeblich beteiligt – Mathias Hofbauer sprang von der Strafbank und netzte zum 3:1 ein. / Foto: Hans Ulrich Muelchi, Swiss Unihockey</p> </div> <p><em>In der Schweiz kann Wiler sein historisches Ausscheiden aus den Playoffs mit einem versöhnlichen Cupsieg kurieren. Vor über 3.000 Zuschauern besiegen die Berner Grünenmatt mit 3:1. Bei den Damen kann Sandra Dirksen ihren Titelreigen nicht fortsetzen, die Red Ants brachten eine versprechende Führung nicht über die Runden.</em></p> <p>Als Wilers Kapitän Mathias Hofbauer in 56. Spielminute auf die Strafbank wanderte, wurde es nochmal eng für den noch aktuellen Meister. Sein Unterzahlspiel überstand man aber mit Bravour und als Hofbauer wieder zurück aufs Feld durfte, dauerte es gerade mal sechs Sekunden und der WM-Rekordscorer machte mit einem scharfen Schlenzer alles klar.</p> <p>Bei den Damen waren Deutschlands Ex-Nationalspielerin Sandra Dirksen und ihre Red Ants auf dem Weg zum vierten Cupsieg in Folge. Rychenberg führte zu Beginn des Schlussdrittels mit 2:0, brach aber ein und unterlag Chur mit 2:5. “Wer den Pokal mit nach Hause nehmen will, muss drei Drittel gut spielen und nicht nur zwei”, bedauert Dirksen.</p> <p>“Wir hatten zwar den besseren Start, aber am Ende doch nur Silber. Fünfzehn Sekunden vor der 2. Drittelspause haben wir ein abgelenktes, unglückliches Tor kassiert, das war der Knackpunkt leider.” Dafür sei man umso motivierter für die bevorstehenden Play-Offs. “Die Atmosphäre bei einem Cup-Finale ist und bleibt einzigartig. Unsere Fans waren toll”, schätzt Dirksen.</p> This is what happens in the cell:
If you are loading your own HTML you can do this in it's CSS. body, .yourClass, #yourDiv { width: 30px; } If you are not, why not try changing the width of the UIWebView?
You can use br tag in the HTML file to adjust your width.
Upgrading EPI5 to EPI6 Assembly newer error
Im getting an error when upgrading EPI 5.2 to EPI 6.0. The error message is in swedish but it enterprate it like the assemblies are newer than the installer, so i downloaded a new version of the installer (deployment center) but i got the same message. ” An unhandled error has occured: Det går inte att läsa in filen eller sammansättningen C:\EPiServer\Sites\Uppgra deraSiteName\SiteName.Web\bin\Sitename.Web.dll eller ett av dess beroenden. Den hä r sammansättningen har skapats med ett program av en senare version än det aktu ella inlästa programmet och kan därför inte läsas in. When executing At C:\Program Files (x86)\EPiServer\Framework\6.0.318.113\Install\System Script s\Install Site (SqlServer).ps1:147 char:27 + Add-EPiAssemblyRedirect <<<< -TargetFilePath $targetWebConfigPath -Source AssemblyPath $file.FullName = Get-EPiIsBulkInstalling At C:\Program Files (x86)\EPiServer\Framework\6.0.318.113\Install\System Scripts\Install Site (SqlServer).ps1:147 char:27 + Add-EPiAssemblyRedirect <<<< -TargetFilePath $targetWebConfigPath -SourceAssemblyPath $file.FullName System.BadImageFormatException: Det går inte att läsa in filen eller sammansättningen C:\EPiServer\Sites\UppgraderaSiteName\SiteName.Web\bin\SiteName.Web.dll eller ett av dess beroenden. Den här sammansättningen har skapats med ett program av en senare version än det aktuella inlästa programmet och kan därför inte läsas in. Filnamn: C:\EPiServer\Sites\SiteName\SiteName.Web\bin\SiteName.Web.dll vid System.Reflection.AssemblyName.nGetFileInformation(String s) vid System.Reflection.AssemblyName.GetAssemblyName(String assemblyFile) vid EPiServer.Install.Xml.Installers.AddAssemblyRedirectInstaller.Install(IDictionary savedState) vid EPiServer.Install.InstallationManager.Install(Installer installer) vid EPiServer.Install.Xml.XmlInstallationManager.AddAssemblyRedirect(String targetFilePath, String assemblyFilePath, String oldVersion) vid EPiServer.Install.Xml.Cmdlets.AddAssemblyRedirectCmdlet.ProcessRecord() vid System.Management.Automation.Cmdlet.DoProcessRecord() vid System.Management.Automation.CommandProcessor.ProcessRecord()”
You are probably running Deployment Center on the wrong .NET Framework version. Check this link if site is built against 4.0: http://world.episerver.com/Blogs/Paul-Smith/Dates1/2011/3/Upgrading-CMS-6-R1-sites-compiled-against-NET-40/ For the record says to add this to your Deployment Center config: <configuration> <startup> <supportedRuntime version="v4.0"/> </startup> </configuration> The Deployment Center configuration file can be found at the following path on the target machine: {Program Files}\EPiServer\Shared\Install\EPiServerInstall.exe.config