I'm pretty new to leaflet and I'm trying to figure out how to use Google Streetview with Leaflet.   What I would like to have is the Google pegman in the right bottom of my map so that I can click and drag it to have the street view :    Can anyone provide me with an example of the Javascript/HTML code that allows to do this ?
123996
The person who asked the question at the link below way back in 2011 said, "I understand that it is possible to incorporate Google StreetView into non-Google apps".  Can anyone tell me how this is possible? I'd like to add street view functionality to my leaflet map.
74352
Upon searching for the OpenLayers plugin, it shows that this plugin is incompatible with version QGIS 3.0. Will this be updated? Is there another way to add Google imagery or any other aerial imagery other than through this plugin?   I noticed the OpenStreetMap layer I had been using with QGIS 2 is still working now that I am using QGIS 3, but the Google Satellite layer no longer appears.
20609
I am trying to get a GeoJSON with projected coordinates to show in Leaflet.  I have no problems loading GeoJSON with lat/lng (EPSG:4326). Here is a  where I load the GeoJSON with unprojected lat/lng.  I am using the Leaflet 1.0.0-beta.2 (954e83d) in the fiddle but I am happy to use another version.  I am aware of the coordsToLatLng method of L.geoJson but no idea how to make this work.  This is the GeoJSON with the projected (EPSG:3857) coordinates.  {     "type": "FeatureCollection",     "crs": {         "type": "name",         "properties": {             "name": "urn:ogc:def:crs:EPSG::3857"         }     },     "features": [{         "type": "Feature",         "properties": {          },         "geometry": {             "type": "Polygon",             "coordinates": [[             [-625570.6, 6465993.0],             [-305006.9, 6696510.8],             [-546330.2, 6768547.6],             [-445478.6, 7053093.0],             [-279794.0, 7056694.8],             [-359034.5, 7337638.4],             [-211359.0, 7485313.8],             [62380.8,   6955843.3],             [220861.7,  6909019.4],             [91195.5,   6700112.6],             [213658.1,  6682103.4],             [-625570.6, 6465993.0]]]         }     }] }     Notes: I am new to Leaflet. I come from a GIS background. I have a very good understanding of projections and transformations. I have a very good understanding of OpenLayers3. I use OL3 to do things such as this on a daily basis. The data in this post is obviously just an example. I am trying to learn Leaflet in order to compare the performance with OL3. I know how to use QGIS and can unproject the data manually but this is not the point of this post.  This is not a repost. I have checked every bit of information on coordsToLatLng but didn't find any good documentation and nothing like a working example. Certainly no fiddle.  Just saying this as I have read a lot of Leaflet posts on gis.stackexchange with half-a-code. And a lot of answers which suggest to change the data. I know that Leaflet is not a GIS system and the makers are not from a GIS background. In the last hour I have just read a lot of rubbish about Leaflet using EPSG:3857 as default SRS and WGS84 being an SRS.
49458
Can I use Google Maps as a layer in ArcMap?  Is it possible?
76496
I had done a few projects using Google Physical/Streets as basemaps but now when I re-open those projects all layers appear except for the google basemap (other layers include .kml).   I had previously had this issue when I had a poor internet connection - the basemap would not load - but I now have a good connection so that should not be the problem.  I have also tried starting a new project and adding Google Physical there but likewise nothing appears. In the old projects I have tried removing and re-adding the basemap but no luck.   I have tried uninstalling and re-installing the OpenLayers Plugin (version 1.3.6) but the problem persists. When I use the plugin to add OSM however it does work (but I need Google for these projects).   I have verified the CRS and have it set to WGS 84/Peudo Mercator EPSG:3857  I am using QGIS 2.8.2-Wien on Mac  How do I make Google Physical visible again?
84720
Whenever I try to export a map with the Google Maps plugin in the background, it exports but just exports to a blank document. When I turn the Plugin off so it is not in the background, it prints fine. Why is this?
119295
For a Peggle-like game, I want to make blocks that follow a curve, like this:    The blocks would then disappear as the ball hits them.  I managed to draw some horizontally, but I'm having trouble making them follow a path:    How do I do this? Do I need to create Box2D objects with custom vertices?
122081
We are building a spatial application targeted to laypeople which will involve viewing and editing vector geodata (currently just points, but linestrings and polygons in the future) with a raster underlay. We'll deploy both web and mobile (iPhone now, Android and perhaps others later) versions. The server is a custom app we are writing, and there are no ESRI products on the server side.  My question, therefore, is: How do we choose which client-side mapping toolkit to use? I'm aware of the following options, are there others?   Google Maps API or similar (Yahoo, MapQuest, etc.) OpenLayers (does it work on mobile browsers?) ESRI's web/mobile APIs   We are particularly interested in the pros/cons of the ESRI APIs under this scenario. Our company does have some kind of relationship with ESRI, though I know nothing about the details (and our group currently has no involvement with ESRI or ESRI products).
46499
UPDATE after trying the OOTB list app:  I have a strange issue with placing a list view web part on a publishing page layout.  The searchbox is displaying, but when I search it does not load any results (the spinner never stops spinning).  The javascript console spits out:      inplview is undefined   so I tried referencing inplview.js. This makes the error message disappear, but still no luck with loading search results. Filtering and sorting works great though.  Note that this it true both for custom XSLT webpart and for the "App" for the list.
34325
I want to know if the latest version of Openlayers (v4.0.1) supports Google Maps as a Tile Layer. I can't find any document ion about this. If Openlayers doesn't support Google Maps, could someone  tell me if there is any way to do this?
101414
I'm using Leaflet and trying zooming on a LineString object from a geojson file. Here is an extract of my file (with a lot of LineString objects):  {   "type": "FeatureCollection",   "features": [     {       "type": "Feature",       "properties": {         "day": "Day 1",         "route": "A - B",         "id": "a-b",         "distance": "256 km",         "profile": "img/profiles/route1.png"       },       "geometry": {         "type": "LineString",         "coordinates": [           [             13.6184281,             45.919077,             0           ],           [             13.6184281,             45.919077,             0           ],           [             13.6186132,             45.9190975,             0           ],           [             13.6195585,             45.9191768,             0           ],           [             13.6198306,             45.9191968,             0           ],           [             13.6201896,             45.9192233,             0           ],           [             13.620569,             45.9192515,             0           ],           [             13.6207494,             45.91926939999999,             0           ],           [             13.6213905,             45.91933280000001,             0           ],           [             13.6216616,             45.9193558,             0           ],           [             13.6224639,             45.9194158,             0           ],           [             13.6235211,             45.9195027,             0           ],           [             13.6241017,             45.91955149999999,             0           ],           [             13.6251088,             45.9196336,             0           ],           [             13.6253359,             45.9196521,             0           ],           [             13.6261509,             45.9197173,             0           ],           [             13.6271895,             45.919803,             0           ],           [             13.6275854,             45.9198347,             0           ]         ]       }     }   ] }   When I click on a HTML element as follows,  &lt;h4&gt;&lt;a class="zoom-to-route" id="a-b"&gt;A - B&lt;/a&gt;&lt;/h4&gt; &lt;h4&gt;&lt;a class="zoom-to-route" id="b-c"&gt;B - B&lt;/a&gt;&lt;/h4&gt;   I'd like to zoom to the corresponding line extent of my geojson file. I can access the geojson file, but I can't retrieve the whole set of coordinates in order to zoom on them:  $(".zoom-to-route").on("click", function(){     var routeId = this.id;       console.log("searching routeId: " + routeId);     var i = 0;       $.getJSON("data/routeHoliday.geojson", function(data) {          $.each(data.features, function (key, val) {             $.each(val.properties, function(propertyKey, propertyVal) {                 console.log(propertyKey, propertyVal);                               if (routeId == propertyVal) {                     console.log("Found " + propertyVal);                     var zoom = data.features[i].geometry;                     console.log(zoom);                     map.fitBounds(zoom.getBounds());                                     }                            });             i++;         });     }); });   The console.log is as follows:  searching routeId: a-b id a-b Found a-b Object { type: "LineString", coordinates: Array[5602] }
36026
When I search for my address on Google Maps it cannot be found which means I can't order takeaway etc.  Is there a way of adding my address to Google Maps or even add a street address?  I want the address to be publicly available so others can search it.
101669
I need to find a centroid (or label point) for irregularly shaped polygons in Google Maps. I'm showing InfoWindows for parcels and need a place to anchor the the InfoWindow that is guaranteed to be on the surface. See images below.     In reality I don't need anything Google Maps specific, just looking for an idea of how to automatically find this point.  My first idea was to find the "false" centroid by taking the average lat and lngs and the randomly placing points out from there until I find one that intersects the polygon. I already have the point-in-polygon code. This just seems awfully "hacky" to me.  I should note that I don't have access to any of the server side code outputting the geometry so I can't do anything like ST_PointOnSurface(the_geom).
105912
I've got a simple Leaflet map with a basemap and one map-layer coming from my own hosted GeoServer.  I made the layers show up nicely in a map.  Now I want to add popups on the point layer showing information stored in MapService.  I couldn't find too much information about that topic.   There's one link to a working example but the link seems to be broken. I found another example which I addopted. You can see it on . I'd like to display the content of the name field in the attribute table but nothing happens when the user clicks the map.  Any idea?
99214
All,  I'm trying to embed Youtube videos and SoundCloud audio clips into a CartoDB infoWindow. I'm trying to do this by simply using the {{embed}} column and entering it into the custom infoWindow html...  &lt;div class="cartodb-popup"&gt;   &lt;a href="#close" class="cartodb-popup-close-button close"&gt;x&lt;/a&gt;   &lt;div class="cartodb-popup-content-wrapper"&gt;     &lt;div class="cartodb-popup-content"&gt;       &lt;h4&gt;name&lt;/h4&gt;       &lt;p&gt;{{name}}&lt;/p&gt;       &lt;h4&gt;description&lt;/h4&gt;       &lt;p&gt;{{description}}&lt;/p&gt;                 {{embed}}     &lt;/div&gt;   &lt;/div&gt;   &lt;div class="cartodb-popup-tip-container"&gt;&lt;/div&gt; &lt;/div&gt;   To see the result, click one of the two point features in the map:  Result Map:     SoundCloud embed code:  &lt;iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/74986952&amp;amp;color=ff5500"&gt;&lt;/iframe&gt;   Youtube embed code:  &lt;iframe width="420" height="315" src="http://www.youtube.com/embed/VlmgW9t3dxg" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
76554
When I try to label the polygon on my Leaflet map I always get the error:     t is undefined   I am trying to do it as shown below:  &lt;html&gt; &lt;head&gt;     &lt;title&gt;Page Title&lt;/title&gt;     &lt;link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.0-rc.3/dist/leaflet.css" /&gt;     &lt;script src="https://unpkg.com/leaflet@1.0.0-rc.3/dist/leaflet.js"&gt;&lt;/script&gt;     &lt;script src="test.js"&gt;&lt;/script&gt;     &lt;style&gt;         #mapid { height: 600px; }     &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="mapid"&gt;&lt;/div&gt; &lt;script&gt;      var mymap = L.map('mapid').setView([51.505, -0.09], 13);     L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {         attribution: 'Map data &amp;copy; &lt;a href="http://openstreetmap.org"&gt;OpenStreetMap&lt;/a&gt; contributors, &lt;a href="http://creativecommons.org/licenses/by-sa/2.0/"&gt;CC-BY-SA&lt;/a&gt;, Imagery © &lt;a href="http://mapbox.com"&gt;Mapbox&lt;/a&gt;',         maxZoom: 18,         id: 'your.mapbox.project.id',         accessToken: 'your.mapbox.public.access.token'     }).addTo(mymap);     var marker = L.marker([51.5, -0.09]).addTo(mymap);     var polygon = L.polygon([         [51.509, -0.08],         [51.503, -0.06],         [51.51, -0.047]     ]).addTo(mymap);     var label = new L.Label()     label.setContent("static label")     label.setLatLng(polygon.getBounds().getCenter())     mymap.showLabel(label); &lt;/script&gt;  &lt;/body&gt; &lt;/html&gt;    I want to show some text inside the polygon. I've tried to accomplish it using label but unable to do it.
91946
What do I need to load a .OSM map in a client side javascript app? (Imagine an offline webapp).