Comments (7)
@ikhaled-ali Hello, thanks for the issue. It's a location picker component issue. I will fix it in v1.1.4.
from react-location-picker.
@ikhaled-ali It's fixed, update to v1.1.4
from react-location-picker.
@rameshsyn
Sorry for inconvenience .. but still not working after update ..
i'm also trying change it via click event but nothing was happen :(
from react-location-picker.
It should have worked.
Can you make sure react-location-picker version is v1.1.4 ?
Can i see your fetch code ? 🎃
from react-location-picker.
class EditEvent extends React.Component {
constructor(props) {
super(props);
this.state = {
error_page: "",
position: {
lat: 33.8199376507058,
lng: 35.49130325317378
},
address: "Airport, Lebanon",
}
}
componentWillMount() {
PostData("getEvent", event_id).then((repos) => {
// event not found
if (repos.ev_number === "NULL") {
this.showNotification("br", "danger", "ERROR", "Event not found!");
this.setState({event_id: 0, error_page: (<ErrorForm/>)});
} else { // event found
this.setState({event_id: event_id});
// set states values
position.lat = repos.position.lat;
position.lng = repos.position.lng;
address = repos.address;
this.setState({formData: initialFormData, position: position, address: address});
}
}
}
}
Render :
<LocationPicker
containerElement={<div style={{height: '100%'}}/>}
mapElement={<div style={{height: '400px'}}/>}
defaultPosition={this.state.position}
onChange={this.handleLocationChange}
/>
from react-location-picker.
@ikhaled-ali looks ok, latitude and longitude should be number. don't forget to coerce it to number in case it's number.
Is there any error in your browser console ? also make sure to include google map api key.
from react-location-picker.
@ikhaled-ali Here's demo for default position change https://codesandbox.io/s/qljl8y8nwq hope it help you.
You can update to v1.2.4, it's got two new features. 🚢
from react-location-picker.
Related Issues (11)
- If you want to update your documentation HOT 1
- typescript typings pls? HOT 2
- Is it possible to use this without Google API key? HOT 1
- is it Possible to fix location pin? HOT 1
- Replace the unmaintained/outdated react-google-maps dependency HOT 5
- Unhandled promise rejection HOT 1
- Location pen sometime is shown and sometime or not
- InvalidValueError thrown
- Map and marker's place doesn't move when the lat,long state is changed by another component. HOT 1
- The Map's zoom does not get changed when the zoom value changes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-location-picker.