How to map some network on the streets using google maps - google-maps

So, I have this fiber optic network. I would like to know if is possible to map any street where my cables are crossing.
The goal I would like to achive is like sim city, where I can see where I have an electrical network. So, in some cases I can have an entire district (or even a city) mapped.
My question are to know if this is possible to achieve with google maps...

I guess this really depends on the data you have for your fiber optic network. Once you know that you have the data needed to draw whatever graphical representation of your network, there are various ways of displaying it on top of a google map. If your network data is represented with geographical locations that are connected together, maybe you can just draw the network connections as polylines? That would at least be a fairly simple approach. Here you can read about how to draw polylines in a map:
https://developers.google.com/maps/documentation/javascript/overlays#Polylines
Using the built-in drawing features (lines, polygons, markers, circles, etc) is probably the easiest thing to do, but there are also possibilities to have more complex/custom overlays as well. You find more info about custom overlays on the URL above as well.

Related

Can google map be connected as Mapbox-gl base layer?

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.

Need to display U.S. metro areas on a map

I need to display U.S. metro areas on a map and overlay some other data on the map. I have google searched for the metro data but I can't seem to find any good sources.
I was hoping to find data that I could use to display polygons of each metro area region on a map. I am using a Bing Maps Control to display the map but I'm not 100% tied to it.
I found a possible sources here https://mapzen.com/data/metro-extracts/ but the shape data looks huge for what I need. 22mb for one region?
I also found some data from opendata here http://opendata.arcgis.com/datasets/0ca49e3a5476488f98a8b1d2a81899e4_8?geometry=-130.807%2C26.621%2C-56.979%2C51.777&uiTab=table&selectedAttributes%5B%5D=MTFCC&chartType=bar&filterByExtent=true&mapSize=map-maximize&orderByFields=OID+DESC which looks like what I want but I can't get the data to download.
I'm assuming there has to be a good source for this data somewhere.
Any other suggestions where to get the metro area polygon(kml..shapefile..etc) data?
If you want boundaries of cities, Bing Maps actually makes these available through the GeoData API: https://msdn.microsoft.com/en-us/library/dn306801.aspx This would let you retrieve the boundaries for individual cities.
If you need all these boundaries in a single file, the US Census makes a file available: https://www.census.gov/geo/maps-data/data/cbf/cbf_ua.html It's 9mb when zipped, unzipped it is 27MB which is about the same size as the data sets you have come across. It is possible to reduce the size of these and also convert them to other formats. I would recommend using GeoJSON over Shapefiles and KML. GeoJSON is much more popular than these other formats now and is much better suited for web based applications.
Looking into this data I see that there is over 3000 polygons. You will struggle to get any web based mapping application to render that may polygons. Especially when each polygon has a decent number of polygons.
I created a low resolution version of this data that is accurate to about 1km. It is a little over 2MB when unzipped. You can find the zipped GeoJSON file here: https://onedrive.live.com/redir?resid=D35222484A76A01!406125&authkey=!ALpJIthBQ-MroSI&ithint=file%2czip
The official source for information about U.S. metro areas (Metropolitan and Micropolitan Statistical Areas) is the CensusBureau You may need to combine the resources there with official county boundary shapefiles.
You could use Google Maps API for Android to get images of U.S. metro areas.
If you want a polygon that is more than a simple square or rectangle, which it sounds like you do, you can specify coordinates for a polygon to obtain an image for your app. Sounds like quite a lot of work, but it is possible. See details here:
https://developers.google.com/maps/documentation/android-api
https://developers.google.com/maps/documentation/android-api/shapes

How to implement a (variable!) map into website

i would implement a Map on my Homepage.
It should display a route from a fix start point to a variable end point.
We have a database (mysql) which contain adresses (Street and number).
And thats the only way to determine the two points
I have completely no idea how to do that.
is OSM (OpenStreetMap) a good way to do that? But how can i get coordinates from a adress ...
Yes, OpenStreetMap is one possible way of solving your task.
To embed a map based on OSM you should either stick to Leaflet or OpenLayers. Both offer slightly different features but are easy to use. And both can easily display a GPX file (your route) as an overlay on top of the map.
For calculating this route you can choose from one of the many online routers, offline routers or just stick to a library.
Similarly OSM offers a way to convert an address to coordinates. This is called geocoding and can be done using Nominatim.
Remember to check the usage policies if you decide to use any of the web services (routing, geocoding, tiles). For most of these services there are alternative instances available which are run by different companies and have less-strict usage policies. And of course you can also run your local instances of most of these services if you like.

Google Maps: Get points contained within a user-drawn polygon?

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

Map Visualizations

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?