2

HTML provides for:

Is there some such provision for make a link of an address that loads the street address into the computer’s default map app? Even better would be a link for a business’ identity along with that street address.

I know I can embed a URL to a specific mapping vendor web site such as Google Maps or Bing Maps. But I would prefer to activate the user’s default map app.

1 Answer 1

2

The closest thing is the GEO URI scheme. It can link to map coordinates (latitude and longitude) like:

<a href="geo:37.786971,-122.399677">

Stack exchange doesn't let me create a GEO link here for you to test. You can go to the Wikipedia page for GEO URI to get a clickable example.

There are some severe limitations:

  • It doesn't support street addresses. The specification states:

    The provision of more complex geometries or locations described by civic addresses is out of scope of this document.

    The scheme does support a map search and addresses often work as the query parameter like <a href="geo:0,0?q=123+main+st,+anytown+XX">

  • Support for it is spotty. Newer Android and iPhones have some support for it, but desktop browsers generally don't. There are JavaScript libraries like dojo-geo-uri-polyfill that use some specific map provider to open such links.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.