Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add working print button #21

Merged
merged 7 commits into from
Jul 23, 2015
Merged

Add working print button #21

merged 7 commits into from
Jul 23, 2015

Conversation

amyleew
Copy link
Owner

@amyleew amyleew commented Jul 21, 2015

Adding print functionality #10, barebones elements added and semi-functional...

image

Run locally, clicking print button provides link in console and link populates with correct route query string. Needs:

  • Pass correct viewOptions for center, zoom and loc values
  • Populate route instructions
  • Style route instructions

image

/cc @aaronlidman @TheMarex

@amyleew
Copy link
Owner Author

amyleew commented Jul 22, 2015

Stuck on this Uncaught TypeError: Cannot set property 'osrm' of undefined doesn't seem to be calling L.Routing.osrm properly @tristen

image

Calling a build and build-print script since i don't want to place the controls the same on the print page https://github.com/amyleew/osrm-frontend/blob/add-print/package.json#L8-L9

Do I need to call L.Routing.OSRM() differently here https://github.com/amyleew/osrm-frontend/blob/add-print/printing.js#L27

@amyleew
Copy link
Owner Author

amyleew commented Jul 22, 2015

Routing instructions are not properly passing into the instructions div tag. Instructions pass when I call L.Routing.control but not sure how to put them into the instructions div class or if that is the best work around.

image

.onAdd function is causing map.getSize() error below, although I can successfully console the value...
image

@amyleew
Copy link
Owner Author

amyleew commented Jul 23, 2015

Fixed with map parameter pass ^^

amyleew added a commit that referenced this pull request Jul 23, 2015
@amyleew amyleew merged commit ffe234f into gh-pages Jul 23, 2015
@amyleew amyleew deleted the add-print branch July 23, 2015 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant