From 09bfeccc2050ae8a08f00b8b5c507f170e3a1645 Mon Sep 17 00:00:00 2001 From: chanywa Date: Mon, 20 Feb 2017 19:47:26 +0900 Subject: [PATCH] Modify to support default image when creating Markers Change-Id: I8066a28fdc23c5e953a34ba9e254a57ca46ece09 --- packaging/csapi-maps.spec | 5 ++++- src/Tizen.Maps/Tizen.Maps/Marker.cs | 30 +++++++++++++++++++++++++++-- src/Tizen.Maps/res/maps_marker_pin.png | Bin 0 -> 296 bytes src/Tizen.Maps/res/maps_marker_sticker.png | Bin 0 -> 408 bytes 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100755 src/Tizen.Maps/res/maps_marker_pin.png create mode 100755 src/Tizen.Maps/res/maps_marker_sticker.png diff --git a/packaging/csapi-maps.spec b/packaging/csapi-maps.spec index 1e521cd..2ccbb9d 100644 --- a/packaging/csapi-maps.spec +++ b/packaging/csapi-maps.spec @@ -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} diff --git a/src/Tizen.Maps/Tizen.Maps/Marker.cs b/src/Tizen.Maps/Tizen.Maps/Marker.cs index 679b4fa..fff9beb 100755 --- a/src/Tizen.Maps/Tizen.Maps/Marker.cs +++ b/src/Tizen.Maps/Tizen.Maps/Marker.cs @@ -179,12 +179,25 @@ namespace Tizen.Maps /// public class Pin : Marker { + private const string defaultImagePath = "/usr/share/dotnet.tizen/framework/res/maps_marker_pin.png"; + + /// + /// Creates Pin type parker + /// + /// Marker coordinates + public Pin(Geocoordinates coordinates) + : base(coordinates, defaultImagePath, Interop.ViewMarkerType.Pin) + { + Resize(new Size(48, 48)); + } + /// /// Creates Pin type parker /// /// Marker coordinates /// Image path - 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 /// public class Sticker : Marker { + private const string defaultImagePath = "/usr/share/dotnet.tizen/framework/res/maps_marker_sticker.png"; + + /// + /// Creates Sticker type parker + /// + /// Marker coordinates + public Sticker(Geocoordinates coordinates) + : base(coordinates, defaultImagePath, Interop.ViewMarkerType.Sticker) + { + Resize(new Size(48, 48)); + } + /// /// Creates Sticker type parker /// /// Marker coordinates /// Image path - 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 index 0000000000000000000000000000000000000000..5162bdb8871e305f2d53498de39668f86ed82ac9 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!?>$`{Ln>~)z2nHoq{zd1LGH-X z@B3$_Us!rl#m$Gs>v!ED)_X~8UfwMoBIk+|zOq){c^4lpz9Dgf{DA`@ZL`>d8M8Rg zuxnVTE9V|P**AqrT{}o?PL79W;U*4uJA92^$5(_!N<2i#UrpXPxL~{k_;m?KK2VqOJ4k7VqRdcSb9{_ s=~W+dhR91UQQ!H;B%7F&l|G&0ZuUDQV|7O50?_LWp00i_>zopr0Og2n3IG5A literal 0 HcmV?d00001 diff --git a/src/Tizen.Maps/res/maps_marker_sticker.png b/src/Tizen.Maps/res/maps_marker_sticker.png new file mode 100755 index 0000000000000000000000000000000000000000..3ff0cd37a1bf70adcdbfce08147d8019e68a77d1 GIT binary patch literal 408 zcmV;J0cZY+P)kY#o3`S8l>)+1Vc{)h9APZE%1cP7K5(^xCpd{F7jiM;3Zgs%|8a>4Pi7;X0f~=nc|F~tdVZF)hU?CG}$M|0%kHz zcFFO8V~ylGIU}UqXHtmdSRsYPIf)b&M}V{^J&|yBBZW`TPM|b6yO7cW-5`OZouU*6 zvjpieP{#CVZL?k!sI$G4wpr@*0CeCSDgpE~MJ3Lkl@ygp4?q9`1Q0*~6$Iirh$rdg z_c7kZ00L<5=MKIo@=bdA>Zc5l+O-e&VntG=tR@q)w5>dvWWO%(4q zrgQUAU`(J|re9QOfVE0LI+0?v!oSSv6N{p#oOJ