diff --git a/src/Netzmacht/LeafletPHP/Encoder/TypeEncoder.php b/src/Netzmacht/LeafletPHP/Encoder/TypeEncoder.php
index <HASH>..<HASH> 100644
--- a/src/Netzmacht/LeafletPHP/Encoder/TypeEncoder.php
+++ b/src/Netzmacht/LeafletPHP/Encoder/TypeEncoder.php
@@ -48,7 +48,7 @@ class TypeEncoder extends AbstractEncoder
     public function encodeIcon(ImageIcon $icon, Encoder $encoder)
     {
         return sprintf(
-            '%s = L.Icon(%s);',
+            '%s = L.icon(%s);',
             $encoder->encodeReference($icon),
             $encoder->encodeArguments(array($icon->getOptions()))
         );
@@ -65,7 +65,7 @@ class TypeEncoder extends AbstractEncoder
     public function encodeDivIcon(DivIcon $icon, Encoder $encoder)
     {
         return sprintf(
-            '%s = L.DivIcon(%s);',
+            '%s = L.divIcon(%s);',
             $encoder->encodeReference($icon),
             $encoder->encodeArguments(array($icon->getOptions()))
         );
Fix broken custom icon rendering: Use factory methods instead of the class names for icons (#3).