Giter Site home page Giter Site logo

Comments (2)

bobbingwide avatar bobbingwide commented on July 20, 2024

$field array could contain

Array

    [address] => (string) "Redhill Road, Rowland's Castle PO9 6DE, UK"
    [lat] => (double) 50.8869073
    [lng] => (double) -0.9662887
    [zoom] => (integer) 13
    [place_id] => (string) "ChIJQfF3bKlFdEgRpSjEMleMGRU"
    [name] => (string) "PO9 6DE"
    [street_name] => (string) "Redhill Road"
    [street_name_short] => (string) "Redhill Rd"
    [city] => (string) "Rowland's Castle"
    [state] => (string) "England"
    [post_code] => (string) "PO9 6DE"
    [country] => (string) "United Kingdom"
    [country_short] => (string) "GB"

$field_info array could contain these fields used to display the Google Maps map.

 [center_lat] => (string) ""
 [center_lng] => (string) ""
 [zoom] => (string) ""
 [height] => (string) ""

from field-block-for-acf-pro.

bobbingwide avatar bobbingwide commented on July 20, 2024

We need to cater for nulls.

When the Google Maps address hadn't been set the first version of the code displayed a series of PHP Warnings.
The logic should cater for $field values not being set.

We need to consider what to display in the block editor.

When the API key is set then the required JavaScript is enqueued. But the Google Maps don't appear in the block, even though they do appear in the Meta boxes.
What can be done about this?
Can the potential presence of a Google Maps field be used to enqueue the JavaScript?

from field-block-for-acf-pro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.