toepoke / mapsed Goto Github PK
View Code? Open in Web Editor NEWGoogle Maps & Places jQuery plug-in
Home Page: http://blog.toepoke.co.uk/mapsed/
Google Maps & Places jQuery plug-in
Home Page: http://blog.toepoke.co.uk/mapsed/
When you click the "custom" place you've just added it brings up the "Save" dialog with an empty dialog rather than the data I've entered.
Is there any way to get the street number / house number from an existing Google Place?
Allow the caller of the library to add headers and/or footers to the view template to give the end-user additional feedback.
For instance if end-user A adds a custom place but end-user B doesn't know it was added by another end-user they may trust the information as much as they would something else that appears on a Google Map (i.e. via the place service) which may have been subject to additional providence.
It would be useful to add something to notify end-user B that they're looking at a place defined by another user.
The map is always showing with maximum zoom, even if I change DEFAULT_ZOOM in mapsed.js or if I give a zoom parameter to the mapOptions when calling $("map_container").mapsed()
When presenting a marker (with attached model/venue data) we already have a canEdit property which flags whether a custom place can be changed in the UI (i.e. the Edit button is visible when the marker window is shown to the user).
However we don't have an equivalent property for the delete button.
Add an associated canDelete flag in the model that mapsed picks up to determine if the Delete operation is available to the end user.
hi, im getting a problem. trying to add link or creating a link on the tittle, in custom map example 1. i add <a href="" tag but it didnt work. please help
Hello Franz,
Again thanks for such a useful plugin. It definitely serves me well in the application Im trying to elaborate.
So I have more like a concern than it is an issue, I was wondering if it is possible to use the search box to center the google maps, instead of pointing out a marker? I mean, when I use the search box to search for something it automatically marks a place and ignores all my previous markers (custom markers) and just focus and that last one.
What I want to do, is load all markers (which I already do) and then just use the search bar just to focus on some location not really setting a marker (kinda like the GeoLocation but with the ability to search for a specific geoCentre). Is it possible to do something like this?
Thanks!
If we have multiple markers in the same location (could be duplicates, could be chance) it's a fluke as to which one appears on the top of the map.
Indeed we kind of have this issue on the home page:
We should add some kind of pagination for markers where a collision occurs, something like this.
I think we need some kind of threshold, a percentage lat/lng of the current bounds of the map. The home page example will be a good one to work with. Remember we'll need to look at the vertical and the horizontal.
Currently onMapMoved is a synchronous operation.
In reality onMapMoved on the consumer side will be a database call, with results being returned by a callback.
onMapMoved should therefore be async to handle the callback.
Particularly on mobile.
They've given no indication they've decided to depreciate the marker yet and they've said they'll give 12 months notice.
But we may pick it up before then.
Looks like there was a change to the Google API at some point and the textSearch with geo co-ordinates stopped working.
Remove references to Google+ as the service Google+ has been closed.
Google are changing the Google Places API which depreciates the "reference" field and replaces it with a new "place_id" field.
Mapsed can add initial places when the map first loads but this would mean loading all custom markers.
Whilst this is useful it doesn't really work for the scenario where you may have thousands of custom places.
We should be able to hook into an event giving us the lat/lng coordinates of the segment of the map that's current shown to the user. That way we'll only have to load the markers that are relevant to the part of the map currently being shown to the end user.
When first clicking on a "custom" marker after it's been saved for the first time the tooltip opens in edit mode. There's no way to select the marker.
This should open in select/edit/delete mode so the user can decide what to do.
Clicking the x in the top corner of the infoWindow isn't a great user experience.
Change it so if the user clicks the marker a second time (whilst it's shown) it closes the infoWindow. In essence clicking the marker toggles the visibility on and off.
As outlined in title.
Should show the edit location dialog and allow the user to save.
Now need to wire up an onAdd event in the settings object. This wasn't required in the previous version.
When add a new place button is clicked on, Is it possible to pre-fill the form with approximate address values of the selected point (if there are any available by the api)?
Currently the full example just stores any custom places in memory. This means on a reload of the page you lose any places you've entered.
Not only is this not very realistic, it's painful to test with as you lose whatever you've do every time we make a change.
Refactor to use localstorage for a more realistic example.
Hi,
First of all, great code !!!!
Second, this is not an issue, but I couldn't find any place to ask for this.
I just want to put a marker with my GeoLocation in the same page as the search-for-places. I tried to do it right after I get the variable (loc), but doesn't work. Finally, i tried this code, which works separetly, the one I put last works.
2 questions:
1st) if I put this code, it only puts the custom marker and doesn't put show the places search.
2nd) position:loc, doesn't work, I need to put the lat & lng (which I don't know as a variable).
function myGeoLocation() {
$("#search-for-places").mapsed({
showOnLoad:
[
{
autoShow: true,
// position: loc, // THIS DOESN'T WORK
lat: 50.825562,
lng:4.418065,
name: "Somewhere",
street: "Over the rainbow, Up high way"
}
]
});
}
function places() {
$("#search-for-places").mapsed({
searchOptions: {
enabled: true,
initSearch: "Football in Leeds",
placeholder: "Search ..."
}
});
}
$(document).ready(function() {
places();
myGeoLocation();
});
Thanks for any guidance ;o)
Sebastian
Repo:
Saved marker still has the + icon against it but it's now been saved so it's no longer an add?
Trying to include the full example demo in my site and tweak it. I've inserted the 4 dependencies below the 'show' button. Nothing else has changed.
Screenshot of the console error: http://puu.sh/7HdNt.png
http://puu.sh/7HdUd.png
Screenshot of the rendered source: http://puu.sh/7HdZT.png
Using Blade for php to render the views so the actual source looks a little different.
** BREAKING CHANGE **
Currently we use the onSave event for saving existing places (via the Edit button) and when new places are added via the + icon.
The problem with this approach is that if the user wants to allow saves when adding a place, but not allow users to edit an existing place. Granted it's a weird scenario but one we should support.
This will however be a breaking change as the user will need to add in the onAddSave event otherwise they can't save new places (as it's now a different event for saving those).
We should also add additional hooks to more easily add permission checks. For example canSave, canAddSave, canDelete, etc. Whilst we have hooks that handle at a global level (e.g. the onDelete hook determines if any venue can be deleted but there's nothing to only limit this to certain venues when they are selected).
Hi Franz,
Thank you so much for helping me with that last issue. Your plugin is exactly what our application needs.
On the inital load of the full-example-06.js, it displays the map great and the search function works fantastic. However I need the 'select' option to appear on a place popup...http://puu.sh/7HQg0.png
This problem exists on the plain full-example-06.html as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.