I got some GeoJSON-features from a file. The attributes of the features are stored in a database (MySQL), because I need them there for some interactions with users. On the other hand some of these attributes should be used to style the features in the map. So the generell problem is, that the browser (with the GeoJSON features from file) and the server (with the database) don't work synchron. This is no problem, when the features are styled after an user-event (a Click for eample). I use AJAX-technology and it works. But how can I manage this, when the map is presented the FIRST time, because at that time there is no user-event. I don't know, how to tell the browser "Please wait until the database ha s selected the data". I tried map.on('precompose', …) , but without success. Would be glad for some hints

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.