You are asking a very general question, with a very specific reference to a particular package, yet without any runable code, or what “does not work” means in this context. This makes it hard to help you.
Also, you seem to be asking a lot of general Julia questions here (which is fine), but all somehow involving OpenStreetMapX. Even if your work focuses on this specific package, I would suggest that you consider reading the general Julia docs multiple times carefully, so that you gain a better understanding about the language. I think it would help you in the long run.
When I run the above code, it gives me “UndefVarError: ECEF not defined”. It’s a bit strange. Because I have “using myModule” in the same file, and inside of the module “myModule.jl”, I have “using OpenStreetMapX”.
Yes, but that using OpenStreetMapX brings the exported symbols of the latter into the namespace of myModule. They are available as eg myModule.ECEF, but since they are not exported to Main, you don’t see them there.
Perhaps you missed what I suggested above: simply using OpenStreetMapX in Main, too.
I don’t think that reexporting is a better solution, except possibly in a user-facing umbrella package that uses other modules/packages as internal implementation details (but that does not seem to be the case here, OpenStreetMapX is a package designed for direct use).
Fine-grained control over namespaces may seem tedious at first, but it is generally valuable as it is very easy to clutter your namespace and get conflicts even in medium-sized projects.