View Code? Open in Web Editor
NEW
A JavaScript “plugin” wrapped around the Bing maps API; it’s main feature is the handling of map directions via jQuery and/or HTML5 data attributes.
Home Page: http://mhulse.github.io/chandler/demo/
CSS 3.64%
JavaScript 81.42%
HTML 14.94%
chandler's Issues
This project is basically just a wrapper around Bing maps API. It's main feature is handling directions via html5 data-
attributes and/or jQuery data
.
Should be data-chandler-xxx
. Namespaced using name of project.
< button class ="map-directions " data-map-from ='{ "address": "San Francisco, CA" } ' data-map-to ='{ "address": "Eugene, Oregon" } '> Change</ button >
If it's just a string addy, no lat/lon, no need for it to be JSON format.
Make this an option; this feature could save some typing and make the code more DRY.
Leave visible comment that asks folks to use their own Bing Maps API key.
They don't need to be defaults for every new project
Need a way to have current nav item selected; not sure if building-in this functionality is the way to go, but would be nice to maybe put that in demo even if not part of core functionality of this plugin.
Allow the directions ID to be specified by a passed-in option:
itineraryContainer : document . getElementById ( 'directions' ) ,
Use basic from html dummies repo
These need to be configurable:
waypointPushpinOptions : {
visible : false
} ,
viapointPushpinOptions : {
//visible: false
}
If #directions
div does not exist, the JS will error out. Need to handle this better.