Retina icon?
Permalink Browser Info Environment
I have an icon that is 60 x 60 but I'd like to scale it down to say, 30x 30 or 25 x 25 when it loads using the "ScaledSize" property:
https://developers.google.com/maps/documentation/javascript/referenc...
Is there any way to do this with the existing code in this addon?
I see in single_pages > dashboard > manage > edit line 69 (pre 5.6 version:)
opts.icon = currentMarkerUrl
can that line be modified to include the Scaled Size?
https://developers.google.com/maps/documentation/javascript/referenc...
Is there any way to do this with the existing code in this addon?
I see in single_pages > dashboard > manage > edit line 69 (pre 5.6 version:)
opts.icon = currentMarkerUrl
can that line be modified to include the Scaled Size?
Type: | Discussion |
---|---|
Status: | New |
function getIconURL(){
if($this->getIconFileObject()) return $this->getIconFileObject()->getUrl();
}
switch it to something like
function getIconURL($scaledSize = null){
if($scaledSize){
if($this->getIconFileObject()) $ifo = $this->getIconFileObject();
$img = Loader::helper('image');
$obj = $img->getThumbnail($ifo,$scaledSize,$scaledSize);
if($obj) return $obj->src;
}else{
if($this->getIconFileObject()) return $this->getIconFileObject()->getUrl();
}
}
or something along those lines. Then you'd also need to mod models/page_mapper around line 60 to pass in the size you are looking for.
I assume there is a way to see if you are on a retina computer through user agent sniffing or something?
This isn't trivial to just drop in, I'd be happy to consider the mods but I need a bit more detail :)
Thank you,
-Scott