Read the statement by Michael Teeuw here.
MMM-google-route Example ?
-
@sdetweil Thankyou for laying it out for me! I was trying to put
destination: [lat: number, lng: number]
instead of
destination: {"lat": number, "lng": number},
- I didn’t know to add the “” or the {}
now, my config looks like:
module: "MMM-google-route", position: "top_left", config: { key: "google api-key", directionsRequest:{ origin: "address, city, country", destination: {"lat": number, "lng": number}, height: "400px",//default=300px width: "400px",//default=300px avoidTolls: true, showAge: false, fontSize: "80%", } } },
I am getting a 400px by 400px box showing up in the “top_left” of my mirror, but now it’s all white with no map being shown…
-
@FruityBebbles said in MMM-google-route Example ?:
origin: “address, city, country”,
you of course set a good start point (origin) with the real location, right?
a good lat/lng near me is { “lat”: 31.4490047,“lng”:-98.6031736}
-
yes… I should have said that my origin is the lat/lng
origin: {"lat": , "lng": }
and my destination is the
address, city, country
but to make things more translucent, here’s my config:
{ module: "MMM-google-route", position: "top_left", config: { key: "api-key", directionsRequest:{ origin: {"lat": 40.0583287, "lng": -75.0074246}, destination: "3401 Civic Center Blvd, Philadelphia, US", height: "400px",//default=300px width: "400px",//default=300px avoidTolls: true, showAge: false, fontSize: "80%", } } },
-
@FruityBebbles please use code blocks
anyhow, try this lat/lng for your destination
39.9487306,-75.1965791
i don’t know anything about this module
-
@sdetweil said in MMM-google-route Example ?:
@FruityBebbles please use code blocks
I thought I did… my badanyhow, try this lat/lng for your destination
39.9487306,-75.1965791
I did, but no change…
i don’t know anything about this module
hahah could have fooled me =)
but no, you’ve gotten me closer to having this work than I have on my own so I thank you a lot. -
@FruityBebbles @sdetweil
Just thought you should know that it works now…
For some reasonheight: "any sized px", width: "any sized px", showAge: true/false, fontSize: 80%
…were all the issues-- not sure why but I figured I’d let anybody who may be reading this know that you should make sure to get your coordinates or whatever “right,” then deal with the fancy stuff, like fontSize and stuff… fwiw
-
@FruityBebbles but I don’t understand how this is different than what you had before
height: "400px",//default=300px width: "400px",//default=300px showAge: false, fontSize: "80%"
-
@sdetweil
ok, so it turns out that those four are supposed to be outside of the directionsRequest: {} parameters.
While I had my config as{ module: "MMM-google-route", position: "top_left", config: { key: "api-key", **directionsRequest:{** origin: {"lat": 40.0583287, "lng": -75.0074246}, destination: "3401 Civic Center Blvd, Philadelphia, US", *height*: "400px",//default=300px *width*: "400px",//default=300px avoidTolls: true, *showAge*: false, *fontSize*: "80%", **}** } },
I had to move those four out, which made my config:
{ module: "MMM-google-route", position: "top_right", config: { *height*: "300px", *width*: "300px", *showAge*: false, *fontSize*: "80%", key: "api-key", **directionsRequest:{** origin: {"lat": 40.0583287, "lng": -75.0074246}, destination: {"lat": 39.9487306, "lng": -75.1965791}, avoidTolls: true, }, } },
the height, width, etc were all in the wrong place-- to me…
-
@FruityBebbles ah, now i have it… yes they have nothing to do with direction to/from