CartoCSS: style a layer based on proximity to another layer - css

I am trying to replicate a google maps style in CartoCSS with Map box studio classic. A default google map has a light brown shading for the industrial area surrounding an airport (as in the screenshot)
Google Maps San Francisco Airport - the target style
Mapbox San Francisco Airport - the current style
The area "underneath" the airport is classed as #Landuse['industrial']. I'm looking for a method to give this area the light brown shading but leaving all other industrial areas unaffected.
I'm thinking down the lines of applying a style to any #Landuse['industrial'] which is in proximity to any #aeroway layer. So the question is: Is this possible and/or is there a better/easier way to achieve the desired style.

It's not possible to style elements based on their proximity in CartoCSS - that kind of geometric filter wouldn't be performant. If the landuse has a unique ID, the best way to solve this problem would be filtering by ID and shading this specific instance.

Related

FacetWP - Drawing Tools

does someone has any suggestion for me in order to implement Google Drawing Tools to FacetWP Map? Basically there will be a map with marker on all houses a real estate agency has and we need to add possibility to draw on map a polygon or circle in order to check houses availability in that space or radius. Thank you very much.
https://developers.google.com/maps/documentation/javascript/examples/drawing-tools

Force border crossing point using Here Api

I'm interested if there is a way to specify border crossing point for cross border routes?
For example, I'm setting start in Monterrey, Mexico, finish in LA, CA and I want route over Tijuana, Mexico. What I get is route over Laredo, TX and then when in San Diego, route goes to Tijuana, back to San Diego and then to LA. So instead of 1 border crossing I have 3 now.
Thanks
Parameter region can be specified to include cross countries in fleet telematics API for more precision. However by default, this will cover the entire world coverage. Please find the link below as reference documentation :
developer.here.com/documentation/fleet-telematics/api-reference.html#tag%2FRouting-&-Route-Matching%252Fpaths%252F~12~1calculateroute.json%252Fget

Map of France with Regions and departments - MAPEL - by NEVELDO

I want to use the script of Neveldo for Mapael in order to insert the regions in the map of France as well as the departments.
I can not nest the codes for the different JS files in each region provided in a single file by Neveldo: https://github.com/neveldo/mapael-maps/tree/master/france.
So I wish to keep the current interactivity of this map by including the regions of NEVELDO. http://cnecj.org/cnejc/annuaire/#cours-appel
The site VincentBroute.fr/Mapael does not give documentation and on the Github either.
Can you help me understand the architecture of this code and possibly give me a solution to nest: map of France, regions and departments?
thank you
I'm not sure what you are trying to do, so I will try my best to answer broadly.
In Mapael, a map is composed of areas. These areas are defined in the map file.
For instance, the map france_departments defines 95 areas, which corresponds to all (Metropolitan) France departments.
However, in the map france_regions_2016, it defines 12 areas which corresponds to all (Metropolitan) regions of France
This means that a map in Mapael cannot have the regions and its departments, because they would overlap and hide each other. This is because they are showing the same thing but with different level of details.
So, if you want to have the departments (in order to show details about it) as well as being able to recognize each regions, the best approach would be to use the map which has the most level of details you need (i.e. the one with departments) and group departments by regions by visually filling them with different colors (e.g. green for Normandie, yellow for Bretagne, and so on...).

Google Maps API - Get accurate coordinates with business/building name.

I am developing a website in ASP.NET in which I need accurate coordinates of properties and populate their markers on Google Maps. I read the Google Maps API documentation and it doesn't accept business names or house numbers. So if I add 5 properties on Moseley Road with postal code WR2 6NJ, they all receive the same coordinates at the beginning of the road, where as they're all separate properties with separate coordinates, for example: Arthur Amos Associates Ltd, Moseley Farms etc.
How can I increase the accuracy so each address gets it's own coordinates? I tried the ROOFTOP and street_address parameters but they didn't help. Do I need to get Google Maps API for Work to get this level of accuracy?
Thanks.

Highlighting borders of state and cities of US in Google Map API 3

I have a scenario where I have to highlight borders and shade a state or city after geocoding it (when I got the lang and lat).
How can I do this, do I need to have a complete information of a city to surround it with polylines? Or is there a way that map API can do this for me.
True. Google does not provide this feature. So what we can do... we can have the lat/long of the borders of the state. And we have to draw polygons ourselves.
I used this JS object. And changed it to Google map object (google.maps.LatLng).
For example:
var statesobj = {"AK": [new google.maps.LatLng(70.0187, -141.0205),
new google.maps.LatLng(70.1292, -141.7291),
new google.maps.LatLng(70.4515, -144.8163)]}
So, it's easy now. Loop on these lat/longs. And you can draw the polygons on every state of US.
So this is the solution I came up. If you guys know some better idea to do it. Please share.
You can also try Google Geo Charts:
http://code.google.com/apis/chart/interactive/docs/gallery/geochart.html
Google Maps API doesn't allow you to retrieve city borders. There are a couple other places from which you can get the coordinates, though:
Flickr API
There is a Flickr API based on photos that people tag, but it's only as accurate as the people who tag photos: so it's good enough for bootstrapping but probably not for production: http://karya-blog.blogspot.com/2012/12/fetching-city-polygons-with-flickr-api.html
Natural Earth Data
An accurate alternative is www.naturalearthdata.com. To get that data from there you just need to make two requests: one with the city name and one with their ID to get the parameters:
unlock.edina.ac.uk/ws/search?name=berlin&gazetteer=naturalearth&format=json
and then
unlock.edina.ac.uk/ws/footprintLookup?format=json&identifier=14126951
and you're set :)
Mapzen
If it's possible for you to pre-fetch the data, go for Mapzen, they have a full and pretty accurate database: https://mapzen.com/data/borders/
I'm afraid google maps API doesn't provide any means to access region (country, state, city, ...) shapes.
If you want to highlight regions you have to create custom overlays based on data acquired elsewhere.
Now the basic map example includes a "mashup" of data. When identifying data is fed to the web service, the resulting output can pinpoint locations on the map.
It shows how a geographic Map Marker is placed on the map to identify a specific location. Map Markers can use the default icon (shown) or a custom image, gauge, or even a chart. Optionally, the map can be configured to display a Map Marker Info window, containing additional location-specific data, when the marker is clicked.
It includes data-driven, colored regions (in this case, representing postal codes) overlaid a map of eg Washington, DC. Logi Info can work with GIS boundary data to produce region overlays for states, counties, cities, school districts, and other areas. Like the Map Marker, regions can be clicked to display a pop-up information window with detail data.

Resources