I use google-map-react and I want to load images from localhost and I have some problems. This is my code:
<GoogleMapReact
onGoogleApiLoaded={({map, maps}) =>
map.mapTypes.set("roadmap", new maps.ImageMapType({
getTileUrl: function (coord, zoom) {
return "http://192.168.1.103/google/" + zoom + "/" + coord.x + "/" + coord.y + ".png"
},
tileSize:new maps.Size(256,256),
name:"GoogleRoadMaps",
maxZoom:18
}))
}
yesIWantToUseGoogleMapApiInternals
defaultCenter={this.props.center}
defaultZoom={this.props.zoom}>
{
this.state.childrenm
}
</GoogleMapReact>
But it doesn't work. What's the problem?