Skip to content

Commit

Permalink
Merge branch 'jsla_224'
Browse files Browse the repository at this point in the history
  • Loading branch information
mmarcon committed Jul 23, 2013
2 parents bf5bf9d + 0b2912a commit 889995d
Show file tree
Hide file tree
Showing 10 changed files with 61 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/extensions/route.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jhere.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tire.adapter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/examples/example.tire.html
Expand Up @@ -287,7 +287,10 @@
click: function(e){
$(this).jHERE('bubble', [52.49, 13.39], {content: JSON.stringify(e.geo), closable: false});
}}).jHERE('heatmap', heatMapData, 'value');
$('#map').jHERE('kml', 'resources/berlin.kml', true);
$('#map').jHERE('kml', 'resources/berlin.kml', true).jHERE('marker', {latitude: 52.5113748680947, longitude: 13.401589126700173}, {icon: 'resources/balloon.png', anchor: {x: 24, y: 48}});
$('#map').on('maplongpress', function(){
alert('Why you keep pressing that button?!');
});
});
</script>
</body>
Expand Down
13 changes: 10 additions & 3 deletions src/extensions/route.js
Expand Up @@ -69,7 +69,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//`marker` is an object containing the same options used for
//`$('.selector').jHERE('marker')`. Options apply to both start and destionation markers.
route = function(from, to, options){
var router, wp, done;
var router, wp, done, cleanOptions;
_ns = _ns || nokia.maps;
from = normalize(from);
to = normalize(to);
Expand Down Expand Up @@ -133,8 +133,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
wp.addCoordinate(from);
wp.addCoordinate(to);

options.transportModes = [options.transportMode];
router.calculateRoute(wp, [options]);
/*Fix for insanity*/
cleanOptions = {
transportModes: [options.transportMode],
type: options.type,
options: options.options,
trafficMode: options.trafficMode
};

router.calculateRoute(wp, [cleanOptions]);
};

$.jHERE.extend('route', route);
Expand Down

0 comments on commit 889995d

Please sign in to comment.