hi,
is it possible to use the google.maps.MapTypeStyle object properties?
with featureType you can define, which elements will be displayed in the map (poi/landscape/transit/...)
https://developers.google.com/maps/documentation/javascript/reference#MapTypeStyle
i can't find it in your component...
Hi,
However, this is a good suggestion and we'll consider adding this feature in a future version.
Alternatively some map elements and controls can be enabled/disabled from the ControlsOptions and MapOptions properties.
Please refer to the PDF manual for a full list with descriptions.
that would be great, if you can implement this feature!
i tried "MapOptions.DisablePOI" and found out, that changing it's value at runtime has no effect.
am i missing something?
however, changing "TMapOptions.SetDisablePOI" in UWebGMaps like this is working at runtime:
procedure TMapOptions.SetDisablePOI(const Value: Boolean);
begin
FDisablePOI := Value;
if Value then
FWebGmaps.ExecJScript('map.setOptions( {styles:[{"featureType":"poi","stylers":[{"visibility":"off"}]}]} );')
else
FWebGmaps.ExecJScript('map.setOptions( {styles:[{"featureType":"poi","stylers":[{"visibility":"on"}]}]} );')
end;
Hi,
This change will be included with the next release of the TMS VCL WebGMaps.
it would be nice to have all possible map features as a property of TWebGMap.
i wrote a wrapper for ExecJScript to set the features at runtime ... but using the components properties will be the "right" way.
The following features are available (GOOGLE Maps API reference):
-
all
(default) selects all features. -
administrative
selects all administrative areas. Styling affects only the labels of administrative areas, not the geographical borders or fill.-
administrative.country
selects countries. -
administrative.land_parcel
selects land parcels. -
administrative.locality
selects localities. -
administrative.neighborhood
selects neighborhoods. -
administrative.province
selects provinces.
-
-
landscape
selects all landscapes.-
landscape.man_made
selects structures built by humans. -
landscape.natural
selects natural features. -
landscape.natural.landcover
selects landcover features. -
landscape.natural.terrain
selects terrain features.
-
-
poi
selects all points of interest.-
poi.attraction
selects tourist attractions. -
poi.business
selects businesses. -
poi.government
selects government buildings. -
poi.medical
selects emergency services, including hospitals, pharmacies, police, doctors, and others. -
poi.park
selects parks. -
poi.place_of_worship
selects places of worship, including churches, temples, mosques, and others. -
poi.school
selects schools. -
poi.sports_complex
selects sports complexes.
-
-
road
selects all roads.-
road.arterial
selects arterial roads. -
road.highway
selects highways. -
road.highway.controlled_access
selects highways with controlled access. -
road.local
selects local roads.
-
-
transit
selects all transit stations and lines.-
transit.line
selects transit lines. -
transit.station
selects all transit stations. -
transit.station.airport
selects airports. -
transit.station.bus
selects bus stops. -
transit.station.rail
selects rail stations.
-
-
water
selects bodies of water.