jeffreykemp / jk64-plugin-simplemap Goto Github PK
View Code? Open in Web Editor NEWSimple Google Map Apex Plugin
License: MIT License
Simple Google Map Apex Plugin
License: MIT License
Instead of standalone functions like jk64plugin_geocode
, put them all in a var called simplemap
, e.g. simplemap.geocode()
.
Rename initMap to init (i.e. we now call simplemap.init()
)
Hi. I an not sure where you place the API Key. I have looked at Application and Page Items but can not find where it should go ?
Regards.
I can only use whole number in Initial Map Position.
I seems that it depends on the values you got for nls_numeric_characters.
Using
show parameter nls_numeric_characters;
gives me
nls_numeric_characters string ,.
Because of that the following code breaks
l_lat := to_number(substr(l_latlong,1,instr(l_latlong,',')-1));
l_lng := to_number(substr(l_latlong,instr(l_latlong,',')+1));
It is because to_number expects an ',' and not a '.' as decimal seperator on my system.
I might just change the code to
l_lat := to_number(substr(l_latlong,1,instr(l_latlong,';')-1));
l_lng := to_number(substr(l_latlong,instr(l_latlong,';')+1));
Then I should be able to enter the values as follows:
-25,23414;-53,12341243
I guess you could make the decimal seperator and the seperator for longitude and latitude configurable. Or at least mention this limitation in the wiki (if it already is written there, I did not see it).
Thanks for the plugin!
Regards
Nils Stritzel
At the moment, if readonly is set, the zoom and pan features are also disabled.
Instead, have separate attributes which control whether zoom and pan are disabled or not.
Set at application level
Add optional geocode item attribute at the component level.
If the user enters a location name or address, do a google maps search and zoom to the relevant location.
Only works if the Google API Key is set.
Sets item to nearest address to the chosen location. Requires Google API Key.
Hi,
First of all I would like to thank you for the plugin and say that it is very good and will be of great help in my project!
Now we are going to what is happening:
I am using the plugin on a page, with a field for the "Address Item" entered in the properties of the plugin, to be done a Google Maps reverse geocode when the user clicks on some point of the map.
So I added a Dynamic Action with the "address" event to populate the address fields returned by the plugin in separate fields on the screen, the problem is that for some addresses I get the "Insufficient results found" alert in the browser, even the address being found by Google.
So I looked in the google documentation and found the code below in this link https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse and saw that in the geocode function the example shows as follows:
if (results [0]) {
map.setZoom (11);
var marker = new google.maps.Marker ({
position: latlng,
map: map
});
infowindow.setContent (results [0] .formatted_address);
infowindow.open (map, marker);
} else {
window.alert ('No results found');
}
Debugging the plugin I saw that the if is done with the test below:
if (results [1]) {
$ s (opt.addressItem, results [0] .formatted_address);
var components = results [0] .address_components;
for (i = 0; i <components.length; i ++) {
("+ components [i] .long_name +") ");" + components [i] .types + "=" + components [i] .short_name + "
}
apex.jQuery ("#" + opt.regionId) .trigger ("address", {map: opt.map, result: results [0]});
} else {
window.alert ('Insufficient results found');
}
In my case the address is found, however only the record is returned in results [0], there are no results [1]. I also saw that there are more addresses that return less results in the array results.
Now I will leave the map by checking the results [0], I would like to know your opinion.
Allow developer to copy-paste from a 3rd party map style site, e.g. https://snazzymaps.com/
Jeffrey,
It must be that I'm doing something wrong, but I cannot get the marker to show.
Furthermore, I'd like to:
My application is here:
http://dapex50.smart4apex.nl/ords/f?p=132
regards,
Richard
Hi Jeffrey,
Thanks a lot for this plugin.
I was wondering if there was any way to have, address, postal code, etc. on separate elements, or if there are any javascript methods I could get them from .
Some attributes required by the plugin have only been enabled for "Desktop". All of them need to be enabled for both Desktop and Mobile.
Marker Zoom Level needs to be made mandatory as the plugin gives a javascript syntax error if it is not provided.
Set the component attribute to required
Error "The application alias "JK64_SIMPLE_MAP" can not be converted to a unique application ID."
It's may be you don't put application alias name in app properties.
Rendering map in a modal popup page causes this message in the console:
"You have included the Google Maps API multiple times on this page. This may cause unexpected errors."
Hi Jeffrey can you just tell me how the map will be marked when a user enter he coordinates in the field.
Thank you!
Option to try to pan&zoom to user's current location (if they give permission to the page to access their location).
Trigger an event providing the approximate (best guess) lat, lng of the user's location.
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.