About node coordinates

Looking at this picture, even if I placed the two nodes on a vertical line, their positions were still quite different
I have set the image as their central location,like this

Is the gap between their location due to the length of the text? Can I set the center of the image to the coordinate center? Or ignore the length of the text

That is why there is a difference between the Node.position property and the Node.location property. If you set Node.locationSpot and/or Node.locationObjectName, you are making the location different from the position. Presumably you are doing so to make it more natural to arrange nodes the way that you want. In your screenshot it appears that you really care about aligning the horizontal centers of the nodes. And in your node template you are clearly making the location point be the middle of the icon, so that the Node.location will be independent of the text or of any other objects you might add to the node.

This is discussed more thoroughly at GoJS Nodes -- Northwoods Software