L leongcc Member Licensed User Longtime User Apr 1, 2016 #1 I am showing Google Map in WebView and I want to display a marker using a local image file (abc.png) as the marker's icon. The codes below are formation of the HTML codes that declares that marker. I am not able to get the file path correct. Any help would be appreciated. Code: s=s+"var test1 = new google.maps.Marker({" s=s+ "position: new google.maps.LatLng(-37.319, 175.854)," s=s+ "icon: 'file:///" & File.DirAssets & "/abc.png'," s=s+ "map: map" s=s+"});"
I am showing Google Map in WebView and I want to display a marker using a local image file (abc.png) as the marker's icon. The codes below are formation of the HTML codes that declares that marker. I am not able to get the file path correct. Any help would be appreciated. Code: s=s+"var test1 = new google.maps.Marker({" s=s+ "position: new google.maps.LatLng(-37.319, 175.854)," s=s+ "icon: 'file:///" & File.DirAssets & "/abc.png'," s=s+ "map: map" s=s+"});"
eurojam Well-Known Member Licensed User Longtime User Apr 1, 2016 #2 try file:///android_asset/abc.png Upvote 0
L leongcc Member Licensed User Longtime User Apr 2, 2016 #3 eurojam said: try file:///android_asset/abc.png Click to expand... Thanks for responding. I did but not working. I had also tried with double slashes 'file://..'. It works only if it is an external URI. Upvote 0
eurojam said: try file:///android_asset/abc.png Click to expand... Thanks for responding. I did but not working. I had also tried with double slashes 'file://..'. It works only if it is an external URI.
L leongcc Member Licensed User Longtime User Apr 2, 2016 #4 It works now. My mistake was I placed png in wrong directory. Upvote 0