5

I'm trying to create a Visual Force page that uses the apex:map tag. My sandbox is on Spring '15 and as far as I know, this component should be available but when I attempt to save, I receive a "Unknown component apex:map" error.

Any ideas?

3 Answers 3

6

Which org edition is your org? Visualforce mapping components are not currently available in Developer Edition organizations.

If your org is not Developer Edition, you might need to enable "Maps and Location Services" in Setup->Customize->Maps and Location -> Settings.

1
  • I've enabled the feature. It is a sandbox I use for development at work. The control works when I add the code in the web form for Salesforce but does not through MavensMate. I do have it working but I don't understand why the REST API in MavensMate doesn't pick up the tag. Apr 10, 2015 at 15:06
0

What API version is the page you are creating? It needs to be v32.

2
  • version 32 in the metadata file. Mar 25, 2015 at 19:52
  • 1
    It is interesting I can use it in the web tool but not in MavensMate. Oh well. Mar 25, 2015 at 19:53
0

The default API version for Mavensmate is usually not the latest version. You need to manually change it to 32 like I did below:

<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>32.0</apiVersion>
    <label>MyVisualForcePage</label>
    <description></description>
</ApexPage>

The file should be called the same as your visualforce page, but ends with the suffix .page-meta.xml

Once it is set to version 32.0 and saved, you won't receive the error message anymore.

1
  • Although I'm using the latest version, I dont see apex:map. I am using API v40. Whats wrong ?
    – user46657
    Jul 11, 2017 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .