Trying to create 3d-like google map. Hence i'm searching for something like 3d leaflet, where you can choose base layer provider (google, bing or openstreetmap)
The question is if having google map as base layer is possible with mapbox gl js?
(regardless of policy)
Generally speaking, if you can find a source of raster tiles in EPSG:3857, accessible by URLs that conform to the XYZ tile numbering scheme, then you can use it as a raster tile source in Mapbox-GL-JS.
From what I know of Google Maps, it mostly uses vector tiles these days, although there is some kind of raster tile service in the mix. It's in the right projection (which Google pretty much invented, after all), but I don't think it is accessible by XYZ. I see URLs that look like this:
https://www.google.com/maps/vt/pb=!1m4!1m3!1i15!2i29569!3i20111!2m3!1e0!2sm!3i450157898!3m7!2sen!5e1105!12m4!1e68!2m2!1sset!2sRoadmap!4e0!5m1!1e0!23i4111425!23i1358757!23i1358902
So, probably no, unless you can find a way around that.
And, as you suggest, doing this would certainly violate Google's terms and conditions, and possibly Mapbox's as well.
Related
I have to plot 200K+ polygons (building shapes) on google map in my project. I have already plotted them on the map. But when moving the map around, it takes sometimes to render polygons. Sometimes even browser tends to freeze. I am looking for either an alternative technique to do that(Something better than Google maps) or a better way to manage polygons.
These are the constraints that I have
** this polygon information is generated on the fly and cannot be pre-prepared.
** Any viewer should be able to see all the polygons(Buildings) in a "bird eye view", so I cant restrict them into a particular zoom level.
You should use some form of server side rendering to generate overlay tiles. We do a similar thing to you with thousands of geospatial objects on a google map. We use the https://carto.com/ service but there are others available and I encourage you to do the research.
Carto stores your data in a postgres database, and then you can use cartodb.js to overlay your rendered data on a map of your choosing (leaflet, google). You can then access click/mouseover events via cartodb.js
https://carto.com/docs/carto-engine/carto-js
I should add that this is easiest for static datasets, but data manipulation on the fly is certainly possible via many of their APIs.
I want to make a very clean map that only shows relevant information - e.g., only the streets that matter. I was going to just draw a map while looking at Google's, but that turned out to be very slow. Is there any way to make this easier, perhaps with some combination of mapping software and Google's API?
(If I should of put this on another SE site, please tell me)
Building upon Suvi's nice answer.
There is a very useful open-source project that collects street data for the entire globe. It's called OpenStreetMap. On their website you can extract the specific street data you need. It only takes a few clicks and bam! you got the map you need. Their data can also be accessed (perphaps easier for some) from here and here. Those links can provide you with the shapefile(map) that you need. Your newly aquired map can then be loaded in the free QGIS software that was mentioned. There you can easily select the streets you are interested in.
When you mean you want to only show "streets that matter", you are out of luck with using Google Maps. Because you have no control over the ROADMAP data that google provides. Now what you can do, is use another mapping software such as ArcGIS or Quantum GIS (which is free). Both these softwares allow you to load road data shapefiles, and you can query (select) which roads you want to display and customize the look of it to your liking.
If you want a quick approach (without having to download softwares), I believe ArcGIS has an online portal which allows you to display information you want on top of their base maps. You will still need the shapefile for your streets though. Check this link out, make yourself an account and experiment around with it http://www.arcgis.com/home/. If you click on the Map tab, it takes you to a screen which should allow you to upload shapefiles.
You said you were ' going to just draw a map'. If all you need is a very clean map, you can consider using iMap Builder which is a mapping software supports both map shape files, and custom Google maps. I have used to create some simple map projects before and worked great for me. You can use their pre-made map templates which shows just the map outlines without any details, you can then add routes / points / mouse-over speech bubbles etc as you need.
A local real estate agent is wanting to add Google maps to his web site that display his listings. However, rather than just showing map markers to all his properties, he wants the web site visitor to be able to draw an arbitrary polygon on the map, click a button, and then display all his houses within those bounds.
My understanding is that this is going to take some GIS voodoo. But before I start looking into the complexity of PostGIS, I'm wondering if there's a better way to do this? The site runs on a standard LAMP stack, but I'm hoping to convince him to move over to Python/Nginx/PostgreSQL.
I don't think there is a need to move to PostGIS.
First chances are that your client gets the list through an MLS database via an address (123 fooview street). Update that list into a kml file
Using Google maps tutorial or this map tool draw a polygon
using this website (js provided inside the maps) you can do the point in polygon(match if any of your addresses are within polygon boundaries). I think they do it in more than one application.
EDIT
another way of doing point-in-polygon in google maps
I don't think this is going to require as much GIS voodoo as you think. I would approach this in three steps:
Generate a latitude and longitude coordinate for each listing. You may already have this information in your database. If you don't, there are several free tools available to do this. We have programmed a Google maps application at work that links directly to our SQL backend infrastructure that I can help you set up in your application if needed.
Use GLatLng to return coordinates for the arbitrary points the respondent is interested in: http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLng
Use some math to create an area of the points (will be easier if you only allow 4 points for the arbitrary shape) and then use a for loop to compare each listing's lat/long pair to the area.
If your area is too large to compare all listings to the arbitrary area, do some pre-filtering based on state/county/city/whatever data you have available.
Hope this helps,
-Chase
We are looking for a great looking map visualization to plot transaction as we process them. We get inbound messages from all over the united states (latitude, longitude). We currently have a Google Maps solution in place, but it just doesn't have the visual impact we are looking for. We really like how this map looks:
http://leftronic.com/doc/screen02.jpg
Do you guys know of any great looking map visualizations?
So, just to clarify, the difference between Google maps and what you are looking for is that Google maps is too busy. Google maps is great if you are trying to get directions to your friend's house, but not for data visualization. Are we on the same page?
If you are looking for visualizations with less clutter, there are several alternatives to Google Maps depending on what you want. If you would like the ease of use of Google Maps, you might want to stick with a Google solution:
Google Geomaps
Google Intensity Maps
For more flexibility but potentially more work you can try Protovis. Protovis also has many other visualizations you can use in addition to maps. You may have to find your own geographic data with protovis. They do have sample geographic data for the U.S. and for the world. Protovis runs entirely in the browser through javascript.
Another possibility is an OpenLayers front end and GeoServer backend. This solution is extremely customizeable and allows the server to do the heavy duty GIS work so the browser doesn't have to. It also requires the most work.
I don't, but here is what I would do:
Get a mercator projection map of the us, like the 2nd image here.
given an address, find it's lat-long with a tool like this.
convert the lat-long into image coordinates. this should be a simple formula, because you used the mercator projection
use a tool like gd to plot a circle at the corresponding point in the image.
Conic projections might look nicer than mercator, but the math is uglier (trig is involved)
Dundas Data Visualization has a superb map component. What platform are the maps being displayed in?
I want to create an application where users can mark on map location of polluting factories. Google map provides a MAP editor feature. We would like to have our own website like www.toxic-map.org where people could mark these locations. What would be the best approach for this?
Additionally we should be able to backup this database which could be cross checked or used for other purposes.
This will enable us to have little accurate census of such entities and thereby helping us in the fight against these environment harming, illegal factories. Most of our work is focused on developing countries of Asia.
Edited: Google maps is one of the options. I am open to other possible solutions as well. I am looking at something we could do quick prototyping in.
Thank you in advance!!
On the client side, I recommend you to have a look at OpenLayers, a free and open source web mapping framework released under a BSD-style License. It is completely written in Javascript and offers a lot of functionality, including the features that your application may need (Add markers to the map, drag them to adjust the locations, ...).
It also supports dozens of different geographic data formats and services such as WMS, KML or Google Maps.
If you are worried about licensing issues regarding the use of Google Maps, you can use other global data sources like OpenStreetMap or a public WMS if they provide enough coverage of your area of interest.
On the server side, I agree with the answer provided by Daniel Vassallo. I will just add a little detail and recommend you to serve the markers in a standard format natively supported by OpenLayers like KML, GeoJSON or GeoRSS. It will make really easy to draw the markers on the map.
Looks like a really interesting project, I hope you are lucky starting it up.
I seem to remember that there are restrictions to what you can do with the coordinates if you enter them through Google's interface, but if that doesn't bother you then sure, Google might be the way to go. (It may just pertain to geometrical figures entered into Google Earth or something like that.)
Google seems to be in line with your ideology anyway, as they're doing a lot of green power development. Might even be a selling point.
But if you can input the data separately and have Google Maps just display it for you then I wouldn't think they could hold claim to the data.
I think your best bet is to use the Google Maps API instead of the map editor in My Maps.
With some basic JavaScript, you will be able to allow users to drop markers on the polluted locations they would want to tag.
You will need a database on the server-side, and a thin application layer that:
Accepts and validates new markers added by users.
Serves the markers from the database to the browser.
You may want to use AJAX to interact between the browser and the application layer.
I think this type of project would be an excellent candidate to be hosted on the Google App Engine. You will be able to leverage on the simplicity of the webapp framework, and the Google Datastore appears to fit well.
As a side-note, you might be interested in checking out the Heat Map API for Google Maps. I think heat maps would look good in a project like this.
The approach is this:
1. User can drag the marker to the location of toxic factory.
2. A simple form opens to enter details of the toxic factory.
3. The latitude, logitude and other datails are then saved in database.
Please refer www.loppee.com They have a similar solution where user can mark the location of people or places of interest. Loppee uses LeafletJS javascript framework. It is a simple framework. You would be able to develop quick prototype. LeafletJS.com has simple and easy to use code samples.
Additionally, you can enable Geolocation and IP triangulation. Refer: Longitude and latitude value from IP address