Page 1 of 1
relative url asset image
Posted: Thu Jan 23, 2014 10:00 am
by Sjef Moling
I like to use a custom icon for my google maps marker. This icon is in the assets of my project, but I can't figure out the relative url to the image (the absolute url was easy to find, but I couldn't get the relative url from this).
Absolute: http://appery.io/app/view/5d129ebd-5f...
I tried: files/views/assets/image/blue-dot.png (but this didn't work)
relative url asset image
Posted: Thu Jan 23, 2014 10:17 am
by Kateryna Grynko
Hi Sjef,
You can use code../image/blue-dot.png/code
Here is an example: https://getsatisfaction.com/apperyio/...
relative url asset image
Posted: Thu Jan 23, 2014 10:28 am
by Sjef Moling
I get a 404 error when I use that.
I set the image using a javascript in the mapping from the geolocation service.
relative url asset image
Posted: Thu Jan 23, 2014 11:23 am
by Kateryna Grynko
Sjef,
Please share your application with a href="mailto:support@apperi.io" rel="nofollow"support@apperi.io/a and tell where to see this.
relative url asset image
Posted: Mon Jan 27, 2014 1:45 pm
by Sjef Moling
I shared it.
The map is on the page "kaart". From the start screen it can be found from "information"="map"
relative url asset image
Posted: Mon Jan 27, 2014 1:52 pm
by Maryna Brodina
Hello! Could you clarify your app name?
relative url asset image
Posted: Mon Jan 27, 2014 2:34 pm
by Sjef Moling
AID=Annual Introduction Days (of Wageningen University, the Netherlands)
relative url asset image
Posted: Mon Jan 27, 2014 4:56 pm
by Kateryna Grynko
Hi Sjef,
Please try codefiles/views/assets/image/blue-dot.png/code, it works for us:
pre
var map = Appery("map").gmap;
Code: Select all
var latlng = new google.maps.LatLng(value.latitude, value.longitude);
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: "You",
icon: "files/views/assets/image/blue-dot.png"
});/pre
relative url asset image
Posted: Tue Jan 28, 2014 8:44 am
by Sjef Moling
thank you, that works for me.