The Zurich release has arrived! Interested in new features and functionalities? Click here for more

use system map page

Lion Kesler
Tera Contributor

Hey
can i show a map
Not through Google?

3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

HI @Lion Kesler ,
I trust you are doing great.

To display a map using Mapbox, you'll need to sign up for an account and obtain an access token. Once you have the token, you can use it to make API calls and render the map on your webpage or application.

Here's a basic example of how you can display a map using Mapbox's JavaScript API:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Mapbox Example</title>
  <style>
    #map {
      width: 100%;
      height: 400px;
    }
  </style>
</head>
<body>
  <div id="map"></div>

  <script src="https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.js"></script>
  <link href="https://api.mapbox.com/mapbox-gl-js/v2.3.1/mapbox-gl.css" rel="stylesheet" />

  <script>
    mapboxgl.accessToken = 'YOUR_ACCESS_TOKEN';

    var map = new mapboxgl.Map({
      container: 'map',
      style: 'mapbox://styles/mapbox/streets-v11',
      center: [-74.5, 40],
      zoom: 9
    });
  </script>
</body>
</html>

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



Hello, first of all, thank you for your reply.
I have a servicenow instance that's self-hosted. I have NO internet access, at all.
I have a plugin called "Map page", or something of the sort.
I, on my self-hosted instance, also have a "map" that I need.

I'm trying to pull out information from that "map" into ServiceNow.
Is there a way that I can do that, without pulling it from Google maps? (no internet access, therefore have a "google map" on my self-hosted platform).
Thanks!

Within ServiceNow, how do I tell it to use my MapBox API and not Google API? I only see properties for Google Maps. If we want to use another API, do we have to create an external web page? I am confused how to stop using Google API - I don't see any options within SN or any documentation online.
Thank you!