Code Monkey home page Code Monkey logo

Comments (9)

mikebronner avatar mikebronner commented on May 29, 2024

@danielwashbrook Any PRs you send in would be greatly appreciated! :)

from nova-map-marker-field.

danielwashbrook avatar danielwashbrook commented on May 29, 2024

Cool, happy to put together a PR. Do you think the best approach would be a field option like
->fieldType('Point') vs ->fieldType('Text')
or a trigger like
->isPointField()
?

from nova-map-marker-field.

mikebronner avatar mikebronner commented on May 29, 2024

@danielwashbrook I can't say without more context. Would it be a huge difference in code either way? Say, if you went one way, how hard would it be to flip to the other way?

from nova-map-marker-field.

danielwashbrook avatar danielwashbrook commented on May 29, 2024

It seems minimal effort either way. A condition in the fillAttributeFromRequest and resolve is all it really needs. But if we go with the fieldType() we could allow for 'Array' storage as well perhaps? We could go with both approaches and see 🤷

from nova-map-marker-field.

nshontz avatar nshontz commented on May 29, 2024

Wanted to follow up and see how this was coming and offer any support.

from nova-map-marker-field.

mikebronner avatar mikebronner commented on May 29, 2024

@danielwashbrook @nshontz Certainly still open for a PR, if you can submit one. :)

from nova-map-marker-field.

nshontz avatar nshontz commented on May 29, 2024

This is where I landed in my attempt: nshontz@e3d375c

BUT it seems like Laravel Nova is trying to serialize and log the change in action_events, because the shape data isn't UTF friendly it's throwing an error. I'm working on that now. If I can find a solution I'll write some documentation and submit the PR.

but if you have feedback on the code now, I'm happy to refactor as needed.

Implemented:
MapMarker::make("Location")
->fieldType('point')
->pointField('location')

from nova-map-marker-field.

nshontz avatar nshontz commented on May 29, 2024

ActionEvent.php: 108
'original' => array_intersect_key($model->getRawOriginal(), $model->getDirty()),

Calling getRawOriginal here returns the raw shape data which yields something like "location":"�\u0010\u0000\u0000\u0001\u0001\u0000\u0000\u0000�Ye���T���q�xA@"

from nova-map-marker-field.

nshontz avatar nshontz commented on May 29, 2024

PR: #53

from nova-map-marker-field.

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.