dmw preliminary work
This commit is contained in:
+39
-15
@@ -1,3 +1,4 @@
|
||||
import { he } from "date-fns/locale";
|
||||
import GoogleMapReact from "google-map-react";
|
||||
const GoogleMapComponent = (props) => {
|
||||
const { center, zoom } = props;
|
||||
@@ -21,22 +22,45 @@ const GoogleMapComponent = (props) => {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// console.log(
|
||||
// "https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
// props.center.lng +
|
||||
// "," +
|
||||
// props.center.lat +
|
||||
// "&zoom=12#/"
|
||||
// );
|
||||
return (
|
||||
<GoogleMapReact
|
||||
options={function (maps) {
|
||||
return {
|
||||
overviewMapControl: true,
|
||||
mapTypeControl: true,
|
||||
};
|
||||
}}
|
||||
bootstrapURLKeys={{
|
||||
key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||
}}
|
||||
defaultCenter={center}
|
||||
defaultZoom={zoom}
|
||||
yesIWantToUseGoogleMapApiInternals
|
||||
onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||
></GoogleMapReact>
|
||||
// <GoogleMapReact
|
||||
// options={function (maps) {
|
||||
// return {
|
||||
// overviewMapControl: true,
|
||||
// mapTypeControl: true,
|
||||
// };
|
||||
// }}
|
||||
// bootstrapURLKeys={{
|
||||
// key: "AIzaSyCzeVrHt544bp_72YCFkw21eDsmI2JEsQo",
|
||||
// }}
|
||||
// defaultCenter={center}
|
||||
// defaultZoom={zoom}
|
||||
// yesIWantToUseGoogleMapApiInternals
|
||||
// onGoogleApiLoaded={({ map, maps }) => ModelsMap(map, maps)}
|
||||
// ></GoogleMapReact>
|
||||
|
||||
<iframe
|
||||
src={
|
||||
"https://datamap.gov.wales/maps/pedw-dev/embed?center=" +
|
||||
props.center.lng +
|
||||
"," +
|
||||
props.center.lat +
|
||||
"&zoom=6#/"
|
||||
}
|
||||
//src={"https://datamap.gov.wales/maps/pedw-dev/embed#/"}
|
||||
width={"100%"}
|
||||
maxheight={"400px"}
|
||||
height={"100%"}
|
||||
className={"mappingFrame"}
|
||||
></iframe>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user