I got trouble changing the pushpin color on the speed.
The FAQ says there is a change necessary at in jmaps.js in the "evHeadingMarkerURL" but there are many functions starting with evHeadingMarkerURL and neither of them changes anything.
I managed to change my Pushpins by modification of the function "evHeadingGreenURL" as described below, but I am wondering what the preferred way of the developer is.
Does anyone have an idea?
/***** Pushpin: *** Returns a 'green' pushpin/icon URL based on the event heading*** @param e The 'MapEventRecord' object**/functionevHeadingGreenURL(e){varppImg="images/pp/pin30";// "extra/images/pp/circle"if((MAX_CREATION_AGE_SEC>0)&&(e.createAge>MAX_CREATION_AGE_SEC)){if(e.speedKPH<1.0){returnppImg+"_black.png";}else{varx=Math.round(e.heading/45.0)%8;returnppImg+"_black_h"+x+".png";}}elseif(e.speedKPH<1.0){// probably not movingreturnppImg+"_green_dot.png";}elseif(e.speedKPH<60.0){varx=Math.round(e.heading/45.0)%8;returnppImg+"_yellow_h"+x+".png";}elseif(e.speedKPH<130.0){varx=Math.round(e.heading/45.0)%8;returnppImg+"_green_h"+x+".png";}else{varx=Math.round(e.heading/45.0)%8;returnppImg+"_black_h"+x+".png";}};
Regards
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everybody,
I got trouble changing the pushpin color on the speed.
The FAQ says there is a change necessary at in jmaps.js in the "evHeadingMarkerURL" but there are many functions starting with evHeadingMarkerURL and neither of them changes anything.
I managed to change my Pushpins by modification of the function "evHeadingGreenURL" as described below, but I am wondering what the preferred way of the developer is.
Does anyone have an idea?
Regards
Martin
Hi,
if I well emember it's possible to define new Icons in Private.XML
<pushpins baseurl="custom/images/pp/">
<pushpin iconoffset="9,30" shadowsize="30,30" iconsize="60,60" key="new_stop" shadow="" icon="new_stop.png">
<pushpin iconoffset="9,30" shadowsize="30,30" iconsize="30,30" key="new_start" shadow="" icon="new_start.png">
</pushpin></pushpin></pushpins>
and the function to manipulate view conditions inside the same private.xml
I'm not sure if the function works only on the GTS Enterprise......
Read remarks in the Private.xml file
Regards
- Pierluigi