Closed ZeroWifix closed 1 year ago
Can you paste the code you used to add those cities?
If you go to Wikipedia and enter the name of the city, the longitude & latitude will be displayed on the rightmost column, just under the image of the country. The long & lat are hyperlinked, which will take you to a page with the decimal values you will want to enter into the config.js.
For example, here is Prague.
Your entry should look roughly like so:
locations: [
{lat:50.083333, lng:14.416667, label: "Prague"},
{lat:45.466944, lng:9.19, label: "Milan"}
],
Here is the code I used :
{
module: "MMM-Globe",
position: "upper_third",
config: {
size:"medium",
locations: [
{lat:48.8534,lng:2.3488,label:"Paris"},
{lat:28.3922,lng:-80.6077,label:"Cape Canaveral"},
{lat:47.6333,lng:6.8667,label:"Belfort"},
{lat:19.4326,lng:-99.1332,label:"Mexico"},
{lat:-20.0074,lng:57.5844,label:"Grand Baie"},
{lat:49.6957,lng:14.8118,label:"Prague"},
{lat:45.4612,lng:9.1878,label:"Milan"},
{lat:-12.04318,lng:-77.02824,label: "Lima"},
{lat:-33.86785,lng:151.20732, label: "Sydney"},
{lat:-33.92584,lng:18.42322, label:"Cape Town"}
]
}
},
I am having the same problem with displaying a list of city names. Is there a limit. If the location are close together, do they not show? Thank you much!
I think @zoom970 is onto something. Cities with labels that are too close together will only display one of the two. Paris seems to be "sticky" for lack of a better term. Having Paris in your array prevents Belfort, Madrid, Prague and Milan from being displayed. I checked and it doesn't seem to be in alphabetical order, nor the order in which the array is specified in the config.js
file.
Hello everyone,
Sorry for the delay. After several tests today, those cities are too close to appear together.
The order doesn't affect the display. In my case, Belfort is in the first position and Prague in the last. If I move Prague to the first, Prague doesn't appear. Same thing for the module size, if I change the size, cities don't appear together.
So, to conclude I have to make a choice between the cities :p
Hello,
Sorry for my english, I'm french :) I tried to display Prague (Czec Republic) and Milan (Italy) with latitude and longitude on Google Maps but both of them doesn't appeared. Do you have the coordinates to use ?
Thanks.