Modify to support default image when creating Markers
authorchanywa <cbible.kim@samsung.com>
Mon, 20 Feb 2017 10:47:26 +0000 (19:47 +0900)
committerchanywa <cbible.kim@samsung.com>
Mon, 20 Feb 2017 10:47:26 +0000 (19:47 +0900)
Change-Id: I8066a28fdc23c5e953a34ba9e254a57ca46ece09

packaging/csapi-maps.spec
src/Tizen.Maps/Tizen.Maps/Marker.cs
src/Tizen.Maps/res/maps_marker_pin.png [new file with mode: 0755]
src/Tizen.Maps/res/maps_marker_sticker.png [new file with mode: 0755]

index 1e521cd..2ccbb9d 100644 (file)
@@ -8,7 +8,7 @@
 
 Name:       csapi-maps
 Summary:    Tizen Map Service API for C#
-Version:    1.0.7
+Version:    1.0.8
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
@@ -48,12 +48,14 @@ done
 %install
 # Runtime Binary
 mkdir -p %{buildroot}%{dotnet_assembly_path}
+mkdir -p %{buildroot}%{dotnet_assembly_path}/res
 for ASM in %{Assemblies}; do
 %if 0%{?_with_corefx}
   install -p -m 644 $ASM/bin/%{BUILDCONF}/$ASM.dll %{buildroot}%{dotnet_assembly_path}
 %else
   install -p -m 644 $ASM/bin/%{BUILDCONF}/Net45/$ASM.dll %{buildroot}%{dotnet_assembly_path}
 %endif
+  install -p -m 644 $ASM/res/*.png %{buildroot}%{dotnet_assembly_path}/res
 done
 # NuGet
 mkdir -p %{buildroot}/nuget
@@ -63,6 +65,7 @@ install -p -m 644 *.nupkg %{buildroot}/nuget
 %manifest %{name}.manifest
 %license LICENSE
 %attr(644,root,root) %{dotnet_assembly_path}/*.dll
+%attr(644,root,root) %{dotnet_assembly_path}/res/*.png
 
 %package nuget
 Summary:   NuGet package for %{name}
index 679b4fa..fff9beb 100755 (executable)
@@ -179,12 +179,25 @@ namespace Tizen.Maps
     /// </summary>
     public class Pin : Marker
     {
+        private const string defaultImagePath = "/usr/share/dotnet.tizen/framework/res/maps_marker_pin.png";
+
+        /// <summary>
+        /// Creates Pin type parker
+        /// </summary>
+        /// <param name="coordinates">Marker coordinates</param>
+        public Pin(Geocoordinates coordinates)
+            : base(coordinates, defaultImagePath, Interop.ViewMarkerType.Pin)
+        {
+            Resize(new Size(48, 48));
+        }
+
         /// <summary>
         /// Creates Pin type parker
         /// </summary>
         /// <param name="coordinates">Marker coordinates</param>
         /// <param name="imagePath">Image path</param>
-        public Pin(Geocoordinates coordinates, string imagePath) : base(coordinates, imagePath, Interop.ViewMarkerType.Pin)
+        public Pin(Geocoordinates coordinates, string imagePath)
+            : base(coordinates, imagePath, Interop.ViewMarkerType.Pin)
         {
         }
     }
@@ -194,12 +207,25 @@ namespace Tizen.Maps
     /// </summary>
     public class Sticker : Marker
     {
+        private const string defaultImagePath = "/usr/share/dotnet.tizen/framework/res/maps_marker_sticker.png";
+
+        /// <summary>
+        /// Creates Sticker type parker
+        /// </summary>
+        /// <param name="coordinates">Marker coordinates</param>
+        public Sticker(Geocoordinates coordinates)
+            : base(coordinates, defaultImagePath, Interop.ViewMarkerType.Sticker)
+        {
+            Resize(new Size(48, 48));
+        }
+
         /// <summary>
         /// Creates Sticker type parker
         /// </summary>
         /// <param name="coordinates">Marker coordinates</param>
         /// <param name="imagePath">Image path</param>
-        public Sticker(Geocoordinates coordinates, string imagePath) : base(coordinates, imagePath, Interop.ViewMarkerType.Sticker)
+        public Sticker(Geocoordinates coordinates, string imagePath)
+            : base(coordinates, imagePath, Interop.ViewMarkerType.Sticker)
         {
         }
     }
diff --git a/src/Tizen.Maps/res/maps_marker_pin.png b/src/Tizen.Maps/res/maps_marker_pin.png
new file mode 100755 (executable)
index 0000000..5162bdb
Binary files /dev/null and b/src/Tizen.Maps/res/maps_marker_pin.png differ
diff --git a/src/Tizen.Maps/res/maps_marker_sticker.png b/src/Tizen.Maps/res/maps_marker_sticker.png
new file mode 100755 (executable)
index 0000000..3ff0cd3
Binary files /dev/null and b/src/Tizen.Maps/res/maps_marker_sticker.png differ