Is it possible to bring in the Transit Layer from Google Maps into an ArcGIS Online Web Map as an item or something? I see this example script on the Google Developers API site, but I know nothing about JavaScript really, where I would type it , or how to add it to a AGOL web map. We don't manage the transit data but it'd be really helpful to use in web maps or planning resource location analysis.
function initMap() {
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 13,
center: { lat: 51.501904, lng: -0.115871 },
});
const transitLayer = new google.maps.TransitLayer();
transitLayer.setMap(map);
}
window.initMap = initMap;
Solved! Go to Solution.
Hi @Teresa_Blader , It's certainly worth reviewing what's available here: OpenStreetMap (arcgis.com)
For example there's a 'live' OSM feature layer for North America which might be useful.
Hi @Teresa_Blader , from what I can find I don't think this is possible with an out-of-the-box solution.
However, I wondered if the Esri layer 'Transportation' would be useful for you? It's available via here: https://services2.arcgis.com/FiaPA4ga0iQKduv3/arcgis/rest/services/Transportation_v1/FeatureServer
Thanks for the reply. While we don't manage our bus transit lines, we do manage our own streets, so Esri's database is out of date in comparison to our centerlines, and also doesn't include transit lines 🙁
Hi @Teresa_Blader, sorry to hear that the Transportation layer isn't quite right. Ultimately it looks like using the Google Transit Layer is also against Google's Terms of Service (similar Community article here: Solved: Google maps in ESRI web application - Esri Community).
Oh thanks for the info! Too bad. Granted no one cited the terms, it'd be nice to read those. Although it sounds like from that article, someone posted a comment on google maps api moving to arcgis api.... not sure how to make sense of that! Seems like Google doesn't have a problem using Esri products... just not the other way around.
While I don't agree that a solution has been found, I wonder if there is a way instead to extract data (like bus stops, which would be a great alternative) from the OpenStreetMap? That is provided by Esri is it not?
Hi @Teresa_Blader , It's certainly worth reviewing what's available here: OpenStreetMap (arcgis.com)
For example there's a 'live' OSM feature layer for North America which might be useful.
That’ll do nicely! Thank you!