Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I obtain lat/lon coordinates of a mouse click?

0
Posted

How do I obtain lat/lon coordinates of a mouse click?

0

The GLG Map Server provides coordinate conversion capabilities that are often used to convert x/y image coordinates of the mouse click to lat/lon coordinates on the map. To convert screen coordinates of the point to lat/lon, use the GetFeatureInfo request type with INFO_TYPE=lat_lon. The I and J parameters of the request supply the Y and Y image coordinates of the point of interest, and an optional INFO_FORMAT parameter may be set to either text/xml or text/plain to specify a desired output format. The map image parameters (i.e. with and height, projection, extent, etc.) needs to be supplied as well in order to convert point’s X/Y coordinates to lat/lon location. The map server will respond with the lat/lon coordinates of the point. For example, the following sample coordinate conversion request: http://www.myserver.com/cgi-bin/GlmScript?VERSION=1.3.0&REQUEST=GetFeatureInfo&SRS=AUTO:42003,9001,-97.,38.&WIDTH=400&HEIGHT=400&BBOX=-2500000,-2500000,2500000,2500000&STRETCH=0&QUERY_LAYERS=d

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123